[Piuparts-commits] [piuparts] 07/08: lib/db: convert list of foreign packages to a dict

Holger Levsen holger at moszumanska.debian.org
Mon Jul 20 08:48:56 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 525b064989ddb9d5401ed56783d00838c24a4f35
Author: Andreas Beckmann <anbe at debian.org>
Date:   Sun Jul 19 23:01:32 2015 +0200

    lib/db: convert list of foreign packages to a dict
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
 piupartslib/packagesdb.py | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/piupartslib/packagesdb.py b/piupartslib/packagesdb.py
index bfb674c..3bd9950 100644
--- a/piupartslib/packagesdb.py
+++ b/piupartslib/packagesdb.py
@@ -251,6 +251,15 @@ class LogfileExists(Exception):
 
 class PackagesDB:
 
+    # these packages are uses as dependencies but are only available
+    # from foreign architectures
+    # HACK: this hardcoded list should be moved to some data file
+    _foreign_packages = {
+        "ia32-libs-i386": "i386",
+        "ia32-libs-gtk-i386": "i386",
+        "libnss-mdns-i386": "i386",
+    }
+
     # keep in sync with piuparts-report.py: emphasize_reason()
     # FIXME: can we reorder this list or remove entries without breaking the counts.txt for the plot?
     _states = [
@@ -704,7 +713,7 @@ class PackagesDB:
                 state = db.get_package_state(package_name, resolve_virtual=resolve_virtual, recurse=False)
                 if state != "does-not-exist":
                     return state
-        if package_name in ["ia32-libs-i386", "ia32-libs-gtk-i386", "libnss-mdns-i386"]:
+        if package_name in self._foreign_packages:
             # HACK! these are arch=i386 packages needed on amd64
             return "essential-required"
         return "does-not-exist"

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