[Piuparts-commits] [SCM] piuparts git repository branch, bikeshed, updated. 0.51-51-g1c35bbd
Andreas Beckmann
anbe at debian.org
Mon May 27 11:11:45 UTC 2013
The following commit has been merged in the bikeshed branch:
commit 2d58b9423baec8b86aa9229d55bc411c9ad387c4
Author: Andreas Beckmann <anbe at debian.org>
Date: Sun May 26 16:56:18 2013 +0200
p: do not run adequate on possibly removed packages
Signed-off-by: Andreas Beckmann <anbe at debian.org>
diff --git a/piuparts.py b/piuparts.py
index 8e4f251..e4ab4f7 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -1236,7 +1236,7 @@ class Chroot:
panic()
def check_adequate(self, packages):
- if settings.adequate and os.path.isfile('/usr/bin/adequate'):
+ if packages and settings.adequate and os.path.isfile('/usr/bin/adequate'):
(status, output) = run(["adequate", "--root", self.name] + packages, ignore_errors=True)
# ignore broken-symlinks - workaround #709372 in adequate
output = re.compile('^[^:]+: broken-symlink .*\n', re.MULTILINE).sub('', output)
@@ -1289,6 +1289,8 @@ class Chroot:
"""Restore package selections in a chroot to the state in
'selections'."""
+ should_be_installed = [p.split("=", 1)[0].strip()
+ for p in packages if not p.endswith("=None")]
packages = [p.split("=", 1)[0].strip() for p in packages]
changes = diff_selections(self, selections)
@@ -1313,7 +1315,7 @@ class Chroot:
self.list_paths_with_symlinks()
self.check_debsums()
- self.check_adequate(packages)
+ self.check_adequate(should_be_installed)
# Run custom scripts before removing all packages.
self.run_scripts("pre_remove")
--
piuparts git repository
More information about the Piuparts-commits
mailing list