X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=melanie;h=1a6fc08a00ce6fd896e8849d17ef922440a29d64;hb=2dc9f86581428e698e834087faa4795a39fcf154;hp=893b8ae75660eb07e854270986bc13a9cbe064f3;hpb=bce58243846a5683b77f586c7210723b47227a60;p=dak.git diff --git a/melanie b/melanie index 893b8ae7..1a6fc08a 100755 --- a/melanie +++ b/melanie @@ -1,8 +1,8 @@ #!/usr/bin/env python # General purpose package removal tool for ftpmaster -# Copyright (C) 2000, 2001 James Troup -# $Id: melanie,v 1.22 2002-02-12 22:14:38 troup Exp $ +# Copyright (C) 2000, 2001, 2002 James Troup +# $Id: melanie,v 1.27 2002-05-23 12:36:44 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 @@ -82,8 +82,7 @@ ARCH, BUG#, COMPONENT and SUITE can be space seperated lists, e.g. # going to do now?" def game_over(): - print "Continue (y/N)? ", - answer = string.lower(utils.our_raw_input()); + answer = string.lower(utils.our_raw_input("Continue (y/N)? ")); if answer != "y": print "Aborted." sys.exit(1); @@ -157,16 +156,11 @@ def main (): else: utils.fubar("Invalid -C/--carbon-copy argument '%s'; not a bug number, 'package' or email address." % (copy_to)); - packages = {}; if Options["Binary-Only"]: field = "b.package"; else: field = "s.source"; - quoted_packages_list = [] - for package in arguments: - quoted_packages_list.append("'%s'" % package) - packages[package] = ""; - con_packages = "AND %s IN (%s)" % (field, string.join(quoted_packages_list, ", ")); + con_packages = "AND %s IN (%s)" % (field, string.join(map(repr, arguments), ", ")); suites = []; suite_ids_list = []; for suite in string.split(Options["Suite"]): @@ -256,7 +250,7 @@ def main (): for i in source_packages.keys(): filename = string.join(source_packages[i], '/'); try: - dsc = utils.parse_changes(filename, 0); + dsc = utils.parse_changes(filename); except utils.cant_open_exc: utils.warn("couldn't open '%s'." % (filename)); continue; @@ -395,7 +389,7 @@ def main (): Subst["__BCC__"] = "Bcc: " + string.join(bcc, ", "); else: Subst["__BCC__"] = "X-Filler: 42"; - Subst["__CC__"] = "X-Melanie: $Revision: 1.22 $"; + Subst["__CC__"] = "X-Melanie: $Revision: 1.27 $"; if carbon_copy: Subst["__CC__"] = Subst["__CC__"] + "\nCc: " + string.join(carbon_copy, ", "); Subst["__SUITE_LIST__"] = suites_list; @@ -409,7 +403,7 @@ def main (): Subst["__PRIMARY_MIRROR__"] = Archive["PrimaryMirror"]; for bug in string.split(Options["Done"]): Subst["__BUG_NUMBER__"] = bug; - mail_message = utils.TemplateSubst(Subst,open(Cnf["Dir::TemplatesDir"]+"/melanie.bug-close","r").read()); + mail_message = utils.TemplateSubst(Subst,Cnf["Dir::Templates"]+"/melanie.bug-close"); utils.send_mail (mail_message, "") logfile.write("=========================================================================\n");