mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-05-05 12:43:49 +00:00
Compare commits
3 Commits
f5e67dbf4f
...
6b64089d59
Author | SHA1 | Date | |
---|---|---|---|
6b64089d59 | |||
e45383418b | |||
dd5baaa07e |
@ -280,6 +280,7 @@ In addition to the depends/optional/make/check depends lists the server also han
|
|||||||
|
|
||||||
Having the initial dependencies tree, the application is looking for packages which contains those (both files and directories) paths and creates the initial packages list. After that, the packages list is reduced in the following way:
|
Having the initial dependencies tree, the application is looking for packages which contains those (both files and directories) paths and creates the initial packages list. After that, the packages list is reduced in the following way:
|
||||||
|
|
||||||
|
* From any leaf exclude the package itself and possible debug packages.
|
||||||
* If the entry (i.e. file or directory) belongs to the package which is in base group, it will be removed.
|
* If the entry (i.e. file or directory) belongs to the package which is in base group, it will be removed.
|
||||||
* If there is a package which depends on the another package which provide the same entry, the package will be removed.
|
* If there is a package which depends on the another package which provide the same entry, the package will be removed.
|
||||||
* After that, if there is a package which *optionally* depends on the another package in the remaining list, the package will be removed.
|
* After that, if there is a package which *optionally* depends on the another package in the remaining list, the package will be removed.
|
||||||
|
@ -57,8 +57,8 @@
|
|||||||
},
|
},
|
||||||
error: (jqXHR, _, errorThrown) => {
|
error: (jqXHR, _, errorThrown) => {
|
||||||
const message = _ =>
|
const message = _ =>
|
||||||
username === "johndoe" && password === "qwerty"
|
username === "admin" && password === "admin"
|
||||||
? "You've entered johnsmith's password, did you make a typo in a username?"
|
? "You've entered a password for user \"root\", did you make a typo in username?"
|
||||||
: `Could not login as ${username}`;
|
: `Could not login as ${username}`;
|
||||||
showFailure("Login error", message, jqXHR, errorThrown);
|
showFailure("Login error", message, jqXHR, errorThrown);
|
||||||
},
|
},
|
||||||
|
@ -197,7 +197,9 @@ class Pacman(LazyLogging):
|
|||||||
content = tar.extractfile(descriptor)
|
content = tar.extractfile(descriptor)
|
||||||
if content is None:
|
if content is None:
|
||||||
continue
|
continue
|
||||||
files = {filename.decode("utf8").rstrip() for filename in content.readlines()}
|
# this is just array of files, however, the directories are with trailing slash,
|
||||||
|
# which previously has been removed by the conversion to ``pathlib.Path``
|
||||||
|
files = {filename.decode("utf8").rstrip().removesuffix("/") for filename in content.readlines()}
|
||||||
|
|
||||||
yield package, files
|
yield package, files
|
||||||
|
|
||||||
|
@ -126,12 +126,14 @@ class PackageArchive:
|
|||||||
"""
|
"""
|
||||||
dependencies, roots = self.depends_on_paths()
|
dependencies, roots = self.depends_on_paths()
|
||||||
installed_packages = self.installed_packages()
|
installed_packages = self.installed_packages()
|
||||||
|
# build list of packages, which contains both the package itself and (possible) debug packages
|
||||||
|
packages = list(self.package.packages) + [f"{package}-debug" for package in self.package.packages]
|
||||||
|
|
||||||
# build initial map of file path -> packages containing this path
|
# build initial map of file path -> packages containing this path
|
||||||
# in fact, keys will contain all libraries the package linked to and all directories it contains
|
# in fact, keys will contain all libraries the package linked to and all directories it contains
|
||||||
dependencies_per_path: dict[Path, list[FilesystemPackage]] = {}
|
dependencies_per_path: dict[Path, list[FilesystemPackage]] = {}
|
||||||
for package_base, package in installed_packages.items():
|
for package_base, package in installed_packages.items():
|
||||||
if package_base in self.package.packages:
|
if package_base in packages:
|
||||||
continue # skip package itself
|
continue # skip package itself
|
||||||
|
|
||||||
required_by = [directory for directory in package.directories if directory in roots]
|
required_by = [directory for directory in package.directories if directory in roots]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user