[Piuparts-commits] [piuparts] 08/09: p: support pre-multiarch dpkg-query as well

Holger Levsen holger at moszumanska.debian.org
Sat May 16 14:51:33 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch develop
in repository piuparts.

commit 3c6294e3672fb9101f9d00553a3904f4e7ea889a
Author: Andreas Beckmann <anbe at debian.org>
Date:   Mon May 4 22:37:29 2015 +0200

    p: support pre-multiarch dpkg-query as well
    
    and fall back to ${Package} if ${binary:Package} is not available
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
 piuparts.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/piuparts.py b/piuparts.py
index 266cae5..4e922ac 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -1201,7 +1201,8 @@ class Chroot:
     def get_selections(self):
         """Get current package selections in a chroot."""
         # "${Status}" emits three columns, e.g. "install ok installed"
-        (status, output) = self.run(["dpkg-query", "-W", "-f", "${Status}\\t${binary:Package}\\t${Version}\\n"])
+        # "${binary:Package}" requires a multi-arch dpkg, so fall back to "${Package}" on older versions
+        (status, output) = self.run(["dpkg-query", "-W", "-f", "${Status}\\t${binary:Package}\\t${Package}\\t${Version}\\n"])
         vdict = {}
         for line in [line for line in output.split("\n") if line.strip()]:
             token = line.split()

-- 
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