[Piuparts-commits] [SCM] piuparts git repository branch, bikeshed, updated. 0.52-43-gca4349b
Andreas Beckmann
anbe at debian.org
Fri May 31 23:19:07 UTC 2013
The following commit has been merged in the bikeshed branch:
commit ca4349baf887bb52065f148a293d343268013d89
Author: Andreas Beckmann <anbe at debian.org>
Date: Fri May 31 18:46:13 2013 +0200
p: pass version-qualified package names to check_adequate()
let check_adequate() decide whether a package qualifies for being checked
Signed-off-by: Andreas Beckmann <anbe at debian.org>
diff --git a/debian/changelog b/debian/changelog
index 29834a7..59227cc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ piuparts (0.53) UNRELEASED; urgency=low
[ Andreas Beckmann ]
* piuparts.py:
+ - Do not run adequate checks on possibly disappearing packages.
* piuparts.conf:
* distros.conf:
- Add "candidates" key to merge multiple Packages files into one virtual
diff --git a/piuparts.py b/piuparts.py
index 119efae..3f17e32 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -1243,6 +1243,7 @@ class Chroot:
def check_adequate(self, packages):
"""Run adequate and categorize output according to our needs. """
+ packages = [p.split("=", 1)[0].strip() for p in packages if not p.endswith("=None")]
if packages and settings.adequate and os.path.isfile('/usr/bin/adequate'):
adequate_tags = [ 'bin-or-sbin-binary-requires-usr-lib-library',
'library-not-found',
@@ -1320,13 +1321,11 @@ class Chroot:
packages = [p.split("=", 1)[0].strip() for p in packages]
self.run(["dpkg", "--purge"] + packages, ignore_errors=True)
- def restore_selections(self, selections, packages):
+ def restore_selections(self, selections, packages_qualified):
"""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]
+ packages = [p.split("=", 1)[0].strip() for p in packages_qualified]
changes = diff_selections(self, selections)
deps = {}
@@ -1350,7 +1349,7 @@ class Chroot:
self.list_paths_with_symlinks()
self.check_debsums()
- self.check_adequate(should_be_installed)
+ self.check_adequate(packages_qualified)
# Run custom scripts before removing all packages.
self.run_scripts("pre_remove")
@@ -2501,7 +2500,7 @@ def install_and_upgrade_between_distros(package_files, packages_qualified):
file_owners = chroot.get_files_owned_by_packages()
# Remove all packages from the chroot that weren't in the reference chroot.
- chroot.restore_selections(chroot_state["selections"], packages)
+ chroot.restore_selections(chroot_state["selections"], packages_qualified)
chroot.check_for_no_processes()
--
piuparts git repository
More information about the Piuparts-commits
mailing list