]> git.decadent.org.uk Git - dak.git/blobdiff - rene
sync
[dak.git] / rene
diff --git a/rene b/rene
index 696729102daa50fd73aeed330f1f17f3bbc9c2d1..04d89a5cb1cb623fbe47679a732b599859ee391f 100755 (executable)
--- a/rene
+++ b/rene
@@ -2,7 +2,7 @@
 
 # Check for obsolete binary packages
 # Copyright (C) 2000, 2001  James Troup <james@nocrew.org>
-# $Id: rene,v 1.4 2001-05-21 02:25:08 troup Exp $
+# $Id: rene,v 1.7 2001-07-25 15:51:15 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
@@ -109,6 +109,9 @@ def main ():
                         version = i[1];
                         if not architectures.has_key(arch):
                             print "[%s]: %s appears for %s (vs. '%s')" % (source, binary, arch, architecture),
+                            if not latest_version:
+                                print "** mwaap, mwapp!  Ignore me **";
+                                continue;
                             if apt_pkg.VersionCompare(latest_version, version) != -1:
                                 print "- out of date.", 
                             else:
@@ -151,6 +154,22 @@ def main ():
                     print " %s has no source [%s: %s]" % (package, source, source_binaries.get(source, "(source does not exist)"));
             packages.close();
 
+    # Check for packages in experimental obsoleted by versions in unstable
+    #
+    # [If melanie was callable from python, we could auto-remove these
+    #  packages...]
+
+    suite_id = db_access.get_suite_id("unstable");
+    q = projectB.query("""
+SELECT s.source, s.version AS experimental, s2.version AS unstable 
+  FROM src_associations sa, source s, source s2, src_associations sa2 
+  WHERE sa.suite = 1 AND sa2.suite = %d AND sa.source = s.id 
+   AND sa2.source = s2.id AND s.source = s2.source 
+   AND versioncmp(s.version, s2.version) < 0""" % (suite_id));
+    ql = q.getresult();
+    if ql != []:
+        print
+        print q
 
 ####################################################################################################