mirror of
https://github.com/kiviktnm/decman.git
synced 2026-09-19 12:08:28 +00:00
Don't try to remove empty build dependencies from chroot #44
This commit is contained in:
@@ -188,7 +188,7 @@ class AUR(plugins.Plugin):
|
||||
)
|
||||
for package in to_remove:
|
||||
dependants = pm.get_dependants(package)
|
||||
if any(dependant in dependants_to_keep for dependant in dependants):
|
||||
if dependants & dependants_to_keep:
|
||||
to_set_as_dependencies.add(package)
|
||||
else:
|
||||
actually_to_remove.add(package)
|
||||
|
||||
@@ -625,8 +625,6 @@ class PackageBuilder:
|
||||
|
||||
add_package_to_cache(self._store, pkgname, version, dest)
|
||||
|
||||
output.print_info("Removing build dependencies from chroot.")
|
||||
|
||||
if len(chroot_new_pacman_pkgs) != 0:
|
||||
to_remove = set()
|
||||
for p in chroot_new_pacman_pkgs:
|
||||
@@ -635,8 +633,13 @@ class PackageBuilder:
|
||||
_, cmd_output = command.check_run_result(cmd, command.run(cmd))
|
||||
real_pkgname = cmd_output.strip()
|
||||
to_remove.add(real_pkgname)
|
||||
cmd = self._commands.remove_chroot(self.chroot_dir, to_remove)
|
||||
command.prg(cmd, pty=config.debug_output)
|
||||
|
||||
if to_remove:
|
||||
output.print_info("Removing build dependencies from chroot.")
|
||||
cmd = self._commands.remove_chroot(self.chroot_dir, to_remove)
|
||||
command.prg(cmd, pty=config.debug_output)
|
||||
else:
|
||||
output.print_debug("No build dependencies to remove from chroot.")
|
||||
|
||||
output.print_info(f"Finished building: '{' '.join(package_names)}'.")
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ class Pacman(plugins.Plugin):
|
||||
dependants_to_keep = self.packages | currently_installed_foreign
|
||||
for package in to_remove:
|
||||
dependants = pm.get_dependants(package)
|
||||
if any(dependant in dependants_to_keep for dependant in dependants):
|
||||
if dependants & dependants_to_keep:
|
||||
to_set_as_dependencies.add(package)
|
||||
else:
|
||||
actually_to_remove.add(package)
|
||||
|
||||
Reference in New Issue
Block a user