+ Subst_close_rm = Subst_common
+ bcc = []
+ if cnf.Find("Dinstall::Bcc") != "":
+ bcc.append(cnf["Dinstall::Bcc"])
+ if cnf.Find("Rm::Bcc") != "":
+ bcc.append(cnf["Rm::Bcc"])
+ if bcc:
+ Subst_close_rm["__BCC__"] = "Bcc: " + ", ".join(bcc)
+ else:
+ Subst_close_rm["__BCC__"] = "X-Filler: 42"
+ summarymail = "%s\n------------------- Reason -------------------\n%s\n" % (summary, Options["Reason"])
+ summarymail += "----------------------------------------------\n"
+ Subst_close_rm["__SUMMARY__"] = summarymail
+ whereami = utils.where_am_i()
+ Archive = cnf.SubTree("Archive::%s" % (whereami))
+ Subst_close_rm["__MASTER_ARCHIVE__"] = Archive["OriginServer"]
+ Subst_close_rm["__PRIMARY_MIRROR__"] = Archive["PrimaryMirror"]
+ for bug in utils.split_args(Options["Done"]):
+ Subst_close_rm["__BUG_NUMBER__"] = bug
+ mail_message = utils.TemplateSubst(Subst_close_rm,cnf["Dir::Templates"]+"/rm.bug-close")
+ utils.send_mail(mail_message)
+
+ # close associated bug reports
+ # FIXME: We should also close possible WNPP bugs for that package, but
+ # currently there's no sane way to determine them
+ if Options["Do-Close"]:
+ Subst_close_other = Subst_common