]> git.decadent.org.uk Git - dak.git/blobdiff - melanie
IntLevel fix for Shania. tbm's TrackingServer patch and comment typo.
[dak.git] / melanie
diff --git a/melanie b/melanie
index 90260fe20e963a3907b8c4ad0efce848cd644a85..aa7bd05e9d3ff9be1836ec4728efb7a8ad1b0ef1 100755 (executable)
--- a/melanie
+++ b/melanie
@@ -2,7 +2,7 @@
 
 # General purpose package removal tool for ftpmaster
 # Copyright (C) 2000, 2001  James Troup <james@nocrew.org>
-# $Id: melanie,v 1.18 2001-11-04 22:35:11 troup Exp $
+# $Id: melanie,v 1.21 2002-01-28 18:53:01 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
@@ -75,10 +75,7 @@ def game_over():
 def main ():
     global Cnf, projectB;
 
-    apt_pkg.init();
-
-    Cnf = apt_pkg.newConfiguration();
-    apt_pkg.ReadConfigFileISC(Cnf,utils.which_conf_file());
+    Cnf = utils.get_conf()
 
     Arguments = [('h',"help","Melanie::Options::Help"),
                  ('a',"architecture","Melanie::Options::Architecture", "HasArg"),
@@ -93,9 +90,11 @@ def main ():
                  ('S',"source-only", "Melanie::Options::Source-Only"),
                  ];
 
-    for i in ["help", "architecture", "binary", "component", "carbon-copy", "done", "reason", "no-action", "partial", "source-only" ]:
-        Cnf["Melanie::Options::%s" % (i)] = "";
-    Cnf["Melanie::Options::Suite"] = "unstable";
+    for i in ["help", "architecture", "binary-only", "component", "carbon-copy", "done", "reason", "no-action", "partial", "source-only" ]:
+       if not Cnf.has_key("Melanie::Options::%s" % (i)):
+           Cnf["Melanie::Options::%s" % (i)] = "";
+    if not Cnf.has_key("Melanie::Options::Suite"):
+       Cnf["Melanie::Options::Suite"] = "unstable";
 
     arguments = apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv);
     Options = Cnf.SubTree("Melanie::Options")
@@ -123,7 +122,7 @@ def main ():
     #
     # Accept 3 types of arguments (space separated):
     #  1) a number - assumed to be a bug number, i.e. nnnnn@bugs.debian.org
-    #  2) the keyword 'package' - cc's $arch@packages.debian.org for every argument
+    #  2) the keyword 'package' - cc's $package@packages.debian.org for every argument
     #  3) contains a '@' - assumed to be an email address, used unmofidied
     #
     carbon_copy = [];
@@ -133,6 +132,8 @@ def main ():
         elif copy_to == 'package':
             for package in arguments:
                 carbon_copy.append(package + "@" + Cnf["Dinstall::PackagesServer"]);
+                if Cnf.has_key("Dinstall::TrackingServer"):
+                    carbon_copy.append(package + "@" + Cnf["Dinstall::TrackingServer"]);
         elif '@' in copy_to:
             carbon_copy.append(copy_to);
         else:
@@ -376,7 +377,7 @@ def main ():
             Subst["__BCC__"] = "Bcc: " + string.join(bcc, ", ");
         else:
             Subst["__BCC__"] = "X-Filler: 42";
-        Subst["__CC__"] = "X-Melanie: $Revision: 1.18 $";
+        Subst["__CC__"] = "X-Melanie: $Revision: 1.21 $";
         if carbon_copy:
             Subst["__CC__"] = Subst["__CC__"] + "\nCc: " + string.join(carbon_copy, ", ");
         Subst["__SUITE_LIST__"] = suites_list;