[makebumpver] Update bumpver to allow Related bugs

Brian C. Lane bcl at redhat.com
Sat Feb 1 03:10:40 UTC 2014


Related bugs that are against a different component will have mismatched
Fixed-in-version strings, which is to be expected. So if it is Related,
valid and has an ack override the bad flag and allow it.

--- NOTE: This should be applied to makebumpver for blivet and anaconda on rhle7 branch
---
 scripts/makebumpver | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/scripts/makebumpver b/scripts/makebumpver
index 1192312..d6b5aac 100755
--- a/scripts/makebumpver
+++ b/scripts/makebumpver
@@ -303,9 +303,11 @@ class MakeBumpVer:
                             bad = True
                     else:
                         bad = True
+                    summary_bug = ckbug
                 else:
                     summary = summary.strip()
                     summary += " (%s)" % author
+                    summary_bug = None
 
                 for bodyline in body:
                     m = re.match(r"^(Resolves|Related|Conflicts):\ +rhbz#\d+.*$",
@@ -324,6 +326,11 @@ class MakeBumpVer:
 
                         if valid:
                             rhbz.add("%s: rhbz#%s" % (action, ckbug))
+
+                            # Remove the summary bug's action if it is for the same bug
+                            summary_str = "Resolves: rhbz#%s" % summary_bug
+                            if summary_bug and ckbug == summary_bug and summary_str in rhbz:
+                                rhbz.remove(summary_str)
                         else:
                             bad = True
 
@@ -335,6 +342,11 @@ class MakeBumpVer:
                                                               fixedIn) or \
                             not self._isRHELBugAcked(ckbug, commit, summary)):
                             bad = True
+                        elif valid and action == 'Related' and \
+                            self._isRHELBugAcked(ckbug, commit, summary):
+                            print "*** Bug %s Related commit %s is allowed\n" % (bug, commit)
+                            # Related bugs only need to be valid and have an ack
+                            bad = False
 
                 if len(rhbz) == 0:
                     print "*** No bugs referenced in commit %s\n" % commit
-- 
1.8.4.2



More information about the anaconda-patches mailing list