提交 8914e2b4 编写于 作者: J Joerg Jaspert

Merge remote branch 'tolimar/rm-close-bugs' into merge

* tolimar/rm-close-bugs:
  Now it works :)
  Now it works :)
Signed-off-by: NJoerg Jaspert <joerg@debian.org>
...@@ -623,6 +623,8 @@ def main (): ...@@ -623,6 +623,8 @@ def main ():
utils.send_mail(mail_message) utils.send_mail(mail_message)
# close associated bug reports # 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"]: if Options["Do-Close"]:
if len(versions) == 1: if len(versions) == 1:
Subst["__VERSION__"] = versions[0] Subst["__VERSION__"] = versions[0]
...@@ -633,13 +635,15 @@ def main (): ...@@ -633,13 +635,15 @@ def main ():
# at this point, I just assume, that the first closed bug gives # at this point, I just assume, that the first closed bug gives
# some usefull information on why the package got removed # some usefull information on why the package got removed
Subst["__BUG_NUMBER__"] = utils.split_args(Options["Done"])[0] Subst["__BUG_NUMBER__"] = utils.split_args(Options["Done"])[0]
print "Package:", package if len(sources) > 1:
print "Bugs found:", bts.get_bugs('src', package, 'status', 'open') utils.fubar("Closing bugs for multiple source pakcages is not supported. Do it yourself.")
for bug in bts.get_bugs('src', package, 'status', 'open'): Subst["__BUG_NUMBER_ALSO__"] = ""
Subst["__BUG_NUMBER_ALSO__"] += bug + "-done@" + cnf["Dinstall::BugServer"] + "," Subst["__SOURCE__"] = source.split("_", 1)[0]
print "Resulting to:", Subst["__BUG_NUMBER_ALSO__"] for bug in bts.get_bugs('src', source.split("_", 1)[0], 'status', 'open'):
Subst["__BUG_NUMBER_ALSO__"] += str(bug) + "-done@" + cnf["Dinstall::BugServer"] + ","
mail_message = utils.TemplateSubst(Subst,cnf["Dir::Templates"]+"/rm.bug-close-related") mail_message = utils.TemplateSubst(Subst,cnf["Dir::Templates"]+"/rm.bug-close-related")
utils.send_mail(mail_message) if Subst["__BUG_NUMBER_ALSO__"]:
utils.send_mail(mail_message)
####################################################################################### #######################################################################################
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册