X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Frm.py;h=e90cfea0c23eb39bec2742d722f22a87efd7d6e7;hb=0d655827e4ec74001c12c5e78e22658e460dc6c3;hp=ec36bf4e49f57687b94e2044812c7fc5629b0cab;hpb=a3bb8f4b75f1812f14f4df676b16fb3fc0e38be9;p=dak.git diff --git a/dak/rm.py b/dak/rm.py index ec36bf4e..e90cfea0 100755 --- a/dak/rm.py +++ b/dak/rm.py @@ -525,8 +525,15 @@ def main (): utils.fubar("Closing bugs for multiple source packages is not supported. Do it yourself.") Subst_close_other["__BUG_NUMBER_ALSO__"] = "" Subst_close_other["__SOURCE__"] = source_pkg - other_bugs = bts.get_bugs('src', source_pkg, 'status', 'open') + merged_bugs = set() + other_bugs = bts.get_bugs('src', source_pkg, 'status', 'open', 'status', 'forwarded') if other_bugs: + for bugno in other_bugs: + if bugno not in merged_bugs: + for bug in bts.get_status(bugno): + for merged in bug.mergedwith: + other_bugs.remove(merged) + merged_bugs.add(merged) logfile.write("Also closing bug(s):") logfile822.write("Also-Bugs:") for bug in other_bugs: