mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-07-14 22:45:47 +00:00
fix: update packages properties after rebuild
This case leads to issue when it is impossible to update list of implicit dependencies correctly in case of multi-packages
This commit is contained in:
@ -136,7 +136,7 @@ class PackageArchive:
|
||||
dependencies, roots = self.depends_on_paths()
|
||||
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]
|
||||
packages = list(self.package.packages) + [f"{self.package.base}-debug"]
|
||||
|
||||
# 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
|
||||
|
@ -62,6 +62,8 @@ class Executor(PackageInfo, Cleaner):
|
||||
patches = self.reporter.package_patches_get(package.base, None)
|
||||
commit_sha = task.init(local_path, patches, local_version)
|
||||
built = task.build(local_path, PACKAGER=packager_id)
|
||||
|
||||
package.with_packages(built, self.pacman)
|
||||
for src in built:
|
||||
dst = self.paths.packages / src.name
|
||||
shutil.move(src, dst)
|
||||
|
@ -568,3 +568,19 @@ class Package(LazyLogging):
|
||||
dict[str, Any]: json-friendly dictionary
|
||||
"""
|
||||
return dataclass_view(self)
|
||||
|
||||
def with_packages(self, packages: list[Path], pacman: Pacman) -> None:
|
||||
"""
|
||||
replace packages descriptions with ones from archives
|
||||
|
||||
Args:
|
||||
packages(Iterable[Path]): paths to package archives
|
||||
pacman(Pacman): alpm wrapper instance
|
||||
"""
|
||||
self.packages = {} # reset state
|
||||
for package in packages:
|
||||
archive = self.from_archive(package, pacman)
|
||||
if archive.base != self.base:
|
||||
continue
|
||||
|
||||
self.packages.update(archive.packages)
|
||||
|
Reference in New Issue
Block a user