]> git.decadent.org.uk Git - dak.git/blobdiff - melanie
sync
[dak.git] / melanie
diff --git a/melanie b/melanie
index 805118b6298dbc73dc4eaa54f287b544db389718..4042ef195485d9659b2e724e5940e5ffd858639f 100755 (executable)
--- a/melanie
+++ b/melanie
@@ -2,7 +2,7 @@
 
 # General purpose package removal tool for ftpmaster
 # Copyright (C) 2000, 2001, 2002  James Troup <james@nocrew.org>
-# $Id: melanie,v 1.28 2002-07-14 15:01:51 troup Exp $
+# $Id: melanie,v 1.30 2002-08-29 22:56:29 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
@@ -29,8 +29,8 @@
 # o OpenBSD team decide to switch to different packet filter under BSD
 #    license. Because Project Goal: Every user should be able to make
 #    changes to source tree. IPF license bad!!
-# o Darren try get back: says, NetBSD, FreeBSD allowed! MUAHAHAHAH!!! 
-# o Theo say: no care, pf much better than ipf! 
+# o Darren try get back: says, NetBSD, FreeBSD allowed! MUAHAHAHAH!!!
+# o Theo say: no care, pf much better than ipf!
 # o Darren changes mind: changes license. But OpenBSD will not change
 #    back to ipf. Darren even much more bitter.
 # o Darren so bitterbitter. Decides: I'LL GET BACK BY FORKING OPENBSD AND
@@ -166,10 +166,14 @@ def main ():
                  utils.parse_args(Options);
 
     # Additional suite checks
+    suite_ids_list = [];
     suites = string.split(Options["Suite"]);
     suites_list = utils.join_with_commas_and(suites);
     if not Options["No-Action"]:
         for suite in suites:
+            suite_id = db_access.get_suite_id(suite);
+            if suite_id != -1:
+                suite_ids_list.append(suite_id);
             if suite == "stable":
                 print "**WARNING** About to remove from the stable suite!"
                 print "This should only be done just prior to a (point) release and not at"
@@ -214,7 +218,7 @@ def main ():
             # Source + Binary
             binary_packages = {};
             # First get a list of binary package names we suspect are linked to the source
-            q = projectB.query("SELECT DISTINCT package FROM binaries WHERE EXISTS (SELECT s.source, s.version, l.path, f.filename FROM source s, src_associations sa, suite su, files f, location l, component c WHERE binaries.source = s.id AND sa.source = s.id AND sa.suite = su.id AND s.file = f.id AND f.location = l.id AND l.component = c.id %s %s %s)" % (con_packages, con_suites, con_components));
+            q = projectB.query("SELECT DISTINCT b.package FROM binaries b, source s, src_associations sa, suite su, files f, location l, component c WHERE b.source = s.id AND sa.source = s.id AND sa.suite = su.id AND s.file = f.id AND f.location = l.id AND l.component = c.id %s %s %s" % (con_packages, con_suites, con_components));
             for i in q.getresult():
                 binary_packages[i[0]] = "";
             # Then parse each .dsc that we found earlier to see what binary packages it thinks it produces
@@ -364,7 +368,7 @@ def main ():
             Subst["__BCC__"] = "Bcc: " + string.join(bcc, ", ");
         else:
             Subst["__BCC__"] = "X-Filler: 42";
-        Subst["__CC__"] = "X-Melanie: $Revision: 1.28 $";
+        Subst["__CC__"] = "X-Melanie: $Revision: 1.30 $";
         if carbon_copy:
             Subst["__CC__"] = Subst["__CC__"] + "\nCc: " + string.join(carbon_copy, ", ");
         Subst["__SUITE_LIST__"] = suites_list;