X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Frm.py;h=71fe792a2d08a3232bf65f99a34da346f28f9113;hb=03a86547e5d9b209016cc0b23f825d3baea92f8c;hp=7dda5239c633433c594affc897eac0baf5ab695f;hpb=b18683b50d8b822811bef9f03c307309cbf821ee;p=dak.git diff --git a/daklib/rm.py b/daklib/rm.py index 7dda5239..71fe792a 100644 --- a/daklib/rm.py +++ b/daklib/rm.py @@ -25,7 +25,17 @@ ################################################################################ -# TODO: Insert "random dak quote" here +# From: Andrew Morton +# Subject: 2.6.6-mm5 +# To: linux-kernel@vger.kernel.org +# Date: Sat, 22 May 2004 01:36:36 -0700 +# X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i386-redhat-linux-gnu) +# +# [...] +# +# Although this feature has been around for a while it is new code, and the +# usual cautions apply. If it munches all your files please tell Jens and +# he'll type them in again for you. ################################################################################ @@ -342,7 +352,7 @@ def remove(session, reason, suites, removals, suite_ids_list = [] suites_list = utils.join_with_commas_and(suites) cnf = utils.get_conf() - con_components = None + con_components = '' ####################################################################################################### @@ -370,7 +380,8 @@ def remove(session, reason, suites, removals, raise ValueError("component '%s' not recognised." % componentname) else: component_ids_list.append(component.component_id) - con_components = "AND component IN (%s)" % ", ".join([str(i) for i in component_ids_list]) + if component_ids_list: + con_components = "AND component IN (%s)" % ", ".join([str(i) for i in component_ids_list]) for i in removals: package = i[0] @@ -383,7 +394,7 @@ def remove(session, reason, suites, removals, if architecture not in d[package][version]: d[package][version].append(architecture) - for package in sorted(removals): + for package in sorted(d): versions = sorted(d[package], cmp=apt_pkg.version_compare) for version in versions: d[package][version].sort(utils.arch_compare_sw)