]> git.decadent.org.uk Git - dak.git/blobdiff - melanie
sort versions
[dak.git] / melanie
diff --git a/melanie b/melanie
index dd52ae31126d5f49e8eb75fe1f7a8962c595423b..bbfeba06437eb217f88c4bb35f805163238ed657 100755 (executable)
--- a/melanie
+++ b/melanie
@@ -1,8 +1,8 @@
 #!/usr/bin/env python
 
 # General purpose package removal tool for ftpmaster
-# Copyright (C) 2000, 2001, 2002  James Troup <james@nocrew.org>
-# $Id: melanie,v 1.32 2002-10-21 14:11:51 troup Exp $
+# Copyright (C) 2000, 2001, 2002, 2003  James Troup <james@nocrew.org>
+# $Id: melanie,v 1.36 2003-02-21 19:18:24 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
@@ -64,12 +64,12 @@ Remove PACKAGE(s) from suite(s).
   -c, --component=COMPONENT  act on this component
   -C, --carbon-copy=EMAIL    send a CC of removal message to EMAIL
   -d, --done=BUG#            send removal message as closure to bug#
+  -h, --help                 show this help and exit
   -m, --reason=MSG           reason for removal
   -n, --no-action            don't do anything
   -p, --partial              don't affect override files
   -s, --suite=SUITE          act on this suite
   -S, --source-only          remove source only
-  -h, --help                 show this help and exit
 
 ARCH, BUG#, COMPONENT and SUITE can be space seperated lists, e.g.
     --architecture=\"m68k i386\""""
@@ -78,8 +78,10 @@ ARCH, BUG#, COMPONENT and SUITE can be space seperated lists, e.g.
 
 ################################################################################
 
-# "That's just fucking great!  Game over, man!  What the fuck are we
-#  going to do now?"
+# "Hudson: What that's great, that's just fucking great man, now what
+#  the fuck are we supposed to do? We're in some real pretty shit now
+#  man...That's it man, game over man, game over, man! Game over! What
+#  the fuck are we gonna do now? What are we gonna do?"
 
 def game_over():
     answer = utils.our_raw_input("Continue (y/N)? ").lower();
@@ -289,8 +291,9 @@ def main ():
     packages.sort();
     for package in packages:
         versions = d[package].keys();
-        versions.sort();
+        versions.sort(apt_pkg.VersionCompare);
         for version in versions:
+            d[package][version].sort(utils.arch_compare_sw);
             summary += "%10s | %10s | %s\n" % (package, version, ", ".join(d[package][version]));
     print "Will remove the following packages from %s:" % (suites_list);
     print
@@ -299,7 +302,7 @@ def main ():
     if Options["Done"]:
         print "Will also close bugs: "+Options["Done"];
     if carbon_copy:
-        print "Will also send CCs to:" + ", ".join(carbon_copy)
+        print "Will also send CCs to: " + ", ".join(carbon_copy)
     print
     print "------------------- Reason -------------------"
     print Options["Reason"];
@@ -368,7 +371,7 @@ def main ():
             Subst["__BCC__"] = "Bcc: " + ", ".join(bcc);
         else:
             Subst["__BCC__"] = "X-Filler: 42";
-        Subst["__CC__"] = "X-Katie: melanie $Revision: 1.32 $";
+        Subst["__CC__"] = "X-Katie: melanie $Revision: 1.36 $";
         if carbon_copy:
             Subst["__CC__"] += "\nCc: " + ", ".join(carbon_copy);
         Subst["__SUITE_LIST__"] = suites_list;