[kteam-tools] verify-release-ready: handle unparseable master release tracking bug

Submitted by Kamal Mostafa on March 3, 2017, 6:56 p.m.

Details

Message ID 1488567376-23719-1-git-send-email-kamal@canonical.com
State New
Headers show

Commit Message

Kamal Mostafa March 3, 2017, 6:56 p.m.
For derivatives, better handle the situation when no release tracking bug
can be parsed from the master changelog entry (e.g. a manually constructed
entry missing the usual "* Release Tracking Bug" block).

In this case, emit
  "master release tracking bug found: warning"
instead of incorrectly complaining that tracking bugs are not unique.

Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 maintscripts/verify-release-ready | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

Comments

Brad Figg March 3, 2017, 7:46 p.m.

Marcelo Cerri March 6, 2017, 12:15 p.m.

Kamal Mostafa March 6, 2017, 4:31 p.m.

Patch hide | download patch | download mbox

diff --git a/maintscripts/verify-release-ready b/maintscripts/verify-release-ready
index 08d9121..5eb2cfb 100755
--- a/maintscripts/verify-release-ready
+++ b/maintscripts/verify-release-ready
@@ -249,6 +249,7 @@  class VerifyReleaseReady():
             if branch not in ['master', 'master-next'] and not branch.endswith('-next'):
                 master_changelog = Debian.master_changelog()
                 found_tracker = False
+                master_tracker_id='NOT-FOUND'
                 l = 0
                 for line in master_changelog[1]['content']:
                     l += 1
@@ -259,13 +260,11 @@  class VerifyReleaseReady():
                     if 'Tracking Bug' in line:
                         found_tracker = True
 
-                unique_tracker = False
                 if found_tracker:
-                    if tracker_id != master_tracker_id:
-                        unique_tracker = True
-
-
-                s.status('unique release tracking bug', unique_tracker)
+                    unique_tracker = tracker_id != master_tracker_id
+                    s.status('unique release tracking bug', unique_tracker)
+                else:
+                    s.status('master release tracking bug found', 'warning')
 
         # Verify that the changelog entry contains no "Miscellaneous" entries
         s.verify_changelog_nomisc()