]> git.decadent.org.uk Git - dak.git/commitdiff
Check broken dependencies for arch-all packages only once.
authorAnsgar Burchardt <ansgar@debian.org>
Tue, 30 Aug 2011 21:08:26 +0000 (21:08 +0000)
committerAnsgar Burchardt <ansgar@debian.org>
Tue, 30 Aug 2011 21:16:25 +0000 (21:16 +0000)
dak/rm.py

index 6aa4101c25f474d4bfd7f9e8f12f104452b5c959..b9d0a108053b16e34d3b814875df4ac960f1935a 100755 (executable)
--- a/dak/rm.py
+++ b/dak/rm.py
@@ -117,9 +117,8 @@ def reverse_depends_check(removals, suite, arches=None, session=None):
         'suite_id':     dbsuite.suite_id,
         'metakey_d_id': metakey_d.key_id,
         'metakey_p_id': metakey_p.key_id,
-        'arch_all_id' : get_architecture('all', session).arch_id,
     }
-    for architecture in all_arches:
+    for architecture in all_arches | set(['all']):
         deps = {}
         sources = {}
         virtual_packages = {}
@@ -138,7 +137,7 @@ def reverse_depends_check(removals, suite, arches=None, session=None):
                 JOIN files f ON b.file = f.id
                 JOIN location l ON f.location = l.id
                 JOIN component c ON l.component = c.id
-                WHERE b.architecture IN (:arch_id, :arch_all_id)'''
+                WHERE b.architecture = :arch_id'''
         query = session.query('id', 'package', 'source', 'component', 'depends', 'provides'). \
             from_statement(statement).params(params)
         for binary_id, package, source, component, depends, provides in query:
@@ -196,7 +195,7 @@ def reverse_depends_check(removals, suite, arches=None, session=None):
         for source, bindict in sorted(all_broken.items()):
             lines = []
             for binary, arches in sorted(bindict.items()):
-                if arches == all_arches:
+                if arches == all_arches or 'all' in arches:
                     lines.append(binary)
                 else:
                     lines.append('%s [%s]' % (binary, ' '.join(sorted(arches))))