[kteam-tools PATCH v3] verify-release-ready: fix for new style of release tb

Kleber Sacilotto de Souza kleber.souza at canonical.com
Tue May 2 13:49:09 UTC 2017


The check for the 'release tracking bug' was still looking for the old
style tracking bug on the changelog:

  * Release Tracking Bug
    - LP: #<lp number>

Change it catch only the new style:

  * linux: <version> -proposed tracker (LP: #<lp number>)

Also fails the check if <lp number> is not an integer.

v2 -> v3:
- remove check for old style entry
- check if <lp number> is an integer
- fix the check for the tb on the master branch
- remove an unused variable

Signed-off-by: Kleber Sacilotto de Souza <kleber.souza at canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo at canonical.com>
---
 maintscripts/verify-release-ready | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/maintscripts/verify-release-ready b/maintscripts/verify-release-ready
index 68ef15be..a0390aa5 100755
--- a/maintscripts/verify-release-ready
+++ b/maintscripts/verify-release-ready
@@ -215,17 +215,18 @@ class VerifyReleaseReady():
         #
         found_tracker = False
         for line in changelog[1]['content']:
-            if found_tracker:
-                if '#' in line:
+            if '-proposed tracker' in line:
+                found_tracker = True
+                try:
                     (junk, tracker_id) = line.split('#')
-                else:
+                    (tracker_id,junk) = tracker_id.split(')')
+                    tracker_id = int(tracker_id)
+                except:
                     tracker_id = 'warning'
                 s.status('conformant release tracking bug line', tracker_id)
                 if tracker_id == 'warning':
                     stdo(colored('\t%s\n' % line, 'yellow'))
                 break
-            if 'Tracking Bug' in line:
-                found_tracker = True
         s.status('release tracking bug', found_tracker)
 
         # If we are on a topic branch make sure we are not re-using the same tracking
@@ -238,15 +239,16 @@ class VerifyReleaseReady():
                 master_changelog = Debian.master_changelog()
                 found_tracker = False
                 master_tracker_id = 'NOT-FOUND'
-                l = 0
                 for line in master_changelog[1]['content']:
-                    l += 1
-                    if found_tracker:
-                        if '#' in line:
+                    if '-proposed tracker' in line:
+                        try:
                             (junk, master_tracker_id) = line.split('#')
+                            (master_tracker_id, junk) = master_tracker_id.split(')')
+                            master_tracker_id = int(master_tracker_id)
+                            found_tracker = True
+                        except:
+                            break
                         break
-                    if 'Tracking Bug' in line:
-                        found_tracker = True
 
                 if found_tracker:
                     unique_tracker = tracker_id != master_tracker_id
-- 
2.11.0





More information about the kernel-team mailing list