Compare commits

..

1 Commits

4 changed files with 4 additions and 9 deletions

View File

@ -280,7 +280,6 @@ 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.

View File

@ -57,8 +57,8 @@
}, },
error: (jqXHR, _, errorThrown) => { error: (jqXHR, _, errorThrown) => {
const message = _ => const message = _ =>
username === "admin" && password === "admin" username === "johndoe" && password === "qwerty"
? "You've entered a password for user \"root\", did you make a typo in username?" ? "You've entered johnsmith's password, did you make a typo in a username?"
: `Could not login as ${username}`; : `Could not login as ${username}`;
showFailure("Login error", message, jqXHR, errorThrown); showFailure("Login error", message, jqXHR, errorThrown);
}, },

View File

@ -197,9 +197,7 @@ class Pacman(LazyLogging):
content = tar.extractfile(descriptor) content = tar.extractfile(descriptor)
if content is None: if content is None:
continue continue
# this is just array of files, however, the directories are with trailing slash, files = {filename.decode("utf8").rstrip() for filename in content.readlines()}
# 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

View File

@ -126,14 +126,12 @@ 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 packages: if package_base in self.package.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]