X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=rene;h=1952d3a3152bf044ee8dc7b59025b7b74ec5ed13;hb=3a77466454ce93fd7681968531bd91003250ab2a;hp=62d7da40934f448f3d03b83541f962b20648867c;hpb=3c82176f5768ffbe3b8ca848c00ec392b0e4aa56;p=dak.git diff --git a/rene b/rene index 62d7da40..1952d3a3 100755 --- a/rene +++ b/rene @@ -2,7 +2,7 @@ # Check for obsolete binary packages # Copyright (C) 2000, 2001, 2002, 2003 James Troup -# $Id: rene,v 1.18 2003-02-07 14:53:45 troup Exp $ +# $Id: rene,v 1.20 2003-03-14 19:03:32 troup Exp $ # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -37,6 +37,7 @@ import apt_pkg; Cnf = None; projectB = None; suite_id = None; +no_longer_in_suite = {}; # Really should be static to add_nbs, but I'm lazy ################################################################################ @@ -50,6 +51,15 @@ Check for obsolete or duplicated packages. ################################################################################ def add_nbs(nbs_d, source, version, package): + # Ensure the package is still unstable (someone may have already removed it) + if no_longer_in_suite.has_key(package): + return; + else: + q = projectB.query("SELECT b.id FROM binaries b, bin_associations ba WHERE ba.bin = b.id AND ba.suite = %s AND b.package = '%s' LIMIT 1" % (suite_id, package)); + if not q.getresult(): + no_longer_in_suite[package] = ""; + return; + if not nbs_d.has_key(source): nbs_d[source] = {}; if not nbs_d[source].has_key(version): @@ -238,7 +248,7 @@ SELECT s.source, s.version AS experimental, s2.version AS unstable for i in ql: (source, experimental_version, unstable_version) = i; print " o %s (%s, %s)" % (source, experimental_version, unstable_version); - nviu_to_remove.extend(source); + nviu_to_remove.append(source); print print "Suggested command:" print " melanie -m \"[rene] NVIU\" -s experimental %s" % (" ".join(nviu_to_remove));