#!/usr/bin/env python
# Check for obsolete binary packages
-# Copyright (C) 2000, 2001, 2002 James Troup <james@nocrew.org>
-# $Id: rene,v 1.17 2003-01-20 19:13:21 troup Exp $
+# Copyright (C) 2000, 2001, 2002, 2003 James Troup <james@nocrew.org>
+# $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
Cnf = None;
projectB = None;
suite_id = None;
+no_longer_in_suite = {}; # Really should be static to add_nbs, but I'm lazy
################################################################################
################################################################################
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):
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));
print ;
- print "Suggested command:"
- print " melanie -m \"[rene] NBS\" -b %s" % (" ".join(nbs_to_remove));
- print
+ if nbs_to_remove:
+ print "Suggested command:"
+ print " melanie -m \"[rene] NBS\" -b %s" % (" ".join(nbs_to_remove));
+ print
print "="*75
print