From 24f19822f16eee0fb28a1e1fc413c67c79547da9 Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Tue, 30 Aug 2011 21:08:26 +0000 Subject: [PATCH] Check broken dependencies for arch-all packages only once. --- dak/rm.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dak/rm.py b/dak/rm.py index 6aa4101c..b9d0a108 100755 --- 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)))) -- 2.39.5