[Piuparts-commits] [piuparts] 11/13: p: fix apt-cache call for lenny
Holger Levsen
holger at moszumanska.debian.org
Sun Nov 24 05:28:35 UTC 2013
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch develop
in repository piuparts.
commit 8cedd6ea9550c5a279144a816eeb4825e32281c5
Author: Andreas Beckmann <anbe at debian.org>
Date: Sun Nov 17 13:09:09 2013 +0100
p: fix apt-cache call for lenny
only apt-cache/lenny does not accept version-qualified package names
Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
piuparts.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/piuparts.py b/piuparts.py
index 48c4426..ab1f2e1 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -2289,7 +2289,11 @@ def install_purge_test(chroot, chroot_state, package_files, packages, extra_pack
# We have package names. Use apt to get all their control
# information.
apt_cache_args = ["apt-cache", "show"]
- apt_cache_args.extend([p.split("=", 1)[0].strip() for p in packages])
+ if os.environ["PIUPARTS_DISTRIBUTION"] in ["lenny"]:
+ # apt-cache in lenny does not accept version-qualified packages
+ apt_cache_args.extend([p.split("=", 1)[0].strip() for p in packages])
+ else:
+ apt_cache_args.extend(packages)
returncode, output = chroot.run(apt_cache_args)
control_infos = deb822.Deb822.iter_paragraphs(output.splitlines())
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git
More information about the Piuparts-commits
mailing list