+ if Options.has_key("Done"):
+ Subst = {};
+ Subst["__ALICIA_ADDRESS__"] = Cnf["Alicia::MyEmailAddress"];
+ Subst["__BUG_SERVER__"] = Cnf["Dinstall::BugServer"];
+ bcc = [];
+ if Cnf.Find("Dinstall::Bcc") != "":
+ bcc.append(Cnf["Dinstall::Bcc"]);
+ if Cnf.Find("Alicia::Bcc") != "":
+ bcc.append(Cnf["Alicia::Bcc"]);
+ if bcc:
+ Subst["__BCC__"] = "Bcc: " + ", ".join(bcc);
+ else:
+ Subst["__BCC__"] = "X-Filler: 42";
+ Subst["__CC__"] = "X-Katie: alicia $Revision: 1.6 $";
+ Subst["__ADMIN_ADDRESS__"] = Cnf["Dinstall::MyAdminAddress"];
+ Subst["__DISTRO__"] = Cnf["Dinstall::MyDistribution"];
+ Subst["__WHOAMI__"] = utils.whoami();
+
+ summary = "Concerning package %s...\n" % (package);
+ summary += "Operating on the %s suite\n" % (suite);
+ if newpriority != oldpriority:
+ summary += "Changed priority from %s to %s\n" % (oldpriority,newpriority);
+ if newsection != oldsection:
+ summary += "Changed section from %s to %s\n" % (oldsection,newsection);
+ Subst["__SUMMARY__"] = summary;
+
+ for bug in utils.split_args(Options["Done"]):
+ Subst["__BUG_NUMBER__"] = bug;
+ mail_message = utils.TemplateSubst(
+ Subst,Cnf["Dir::Templates"]+"/alicia.bug-close");
+ utils.send_mail(mail_message);
+ Logger.log(["closed bug",bug]);
+