- if Cnf["Melanie::Options::Done"]:
- for bug in string.split(Cnf["Melanie::Options::Done"]):
- mail_message = """Return-Path: %s
-From: %s
-To: %s-close@bugs.debian.org
-Bcc: troup@auric.debian.org
-Subject: Bug#%s: fixed
-
-We believe that the bug you reported is now fixed; the following
-package(s) have been removed from %s:
-
-%s
-Note that the package(s) have simply been removed from the tag
-database and may (or may not) still be in the pool; this is not a bug.
-The package(s) will be physically removed automatically when no suite
-references them (and in the case of source, when no binary references
-it). Please also remember that the changes have been done on the
-master archive (ftp-master.debian.org) and will not propagate to any
-mirrors (ftp.debian.org included) until the next cron.daily run at the
-earliest.
-
-Thank you for reporting the bug, which will now be closed. If you
-have further comments please address them to %s@bugs.debian.org.
-
-This message was generated automatically; if you believe that there is
-a problem with it please contact the archive administrators by mailing
-ftpmaster@debian.org.
-
-Debian distribution maintenance software
-pp.
-%s (the ftpmaster behind the curtain)
-""" % (Cnf["Melanie::MyEmailAddress"], Cnf["Melanie::MyEmailAddress"], bug, bug, suites_list, summary, bug, whoami);
+ if Options["Done"]:
+ Subst = {};
+ Subst["__MELANIE_ADDRESS__"] = Cnf["Melanie::MyEmailAddress"];
+ Subst["__BUG_SERVER__"] = Cnf["Dinstall::BugServer"];
+ bcc = [];
+ if Cnf.Find("Dinstall::Bcc") != "":
+ bcc.append(Cnf["Dinstall::Bcc"]);
+ if Cnf.Find("Melanie::Bcc") != "":
+ bcc.append(Cnf["Melanie::Bcc"]);
+ if bcc:
+ Subst["__BCC__"] = "Bcc: " + string.join(bcc, ", ");
+ else:
+ Subst["__BCC__"] = "X-Filler: 42";
+ Subst["__CC__"] = "X-Melanie: $Revision: 1.20 $";
+ if carbon_copy:
+ Subst["__CC__"] = Subst["__CC__"] + "\nCc: " + string.join(carbon_copy, ", ");
+ Subst["__SUITE_LIST__"] = suites_list;
+ Subst["__SUMMARY__"] = summary;
+ Subst["__ADMIN_ADDRESS__"] = Cnf["Dinstall::MyAdminAddress"];
+ Subst["__DISTRO__"] = Cnf["Dinstall::MyDistribution"];
+ Subst["__WHOAMI__"] = whoami;
+ whereami = utils.where_am_i();
+ Archive = Cnf.SubTree("Archive::%s" % (whereami));
+ Subst["__MASTER_ARCHIVE__"] = Archive["OriginServer"];
+ 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());