[kteam-tools][PATCH] start-sru-cycle: change backports / derivatives format in tracking bug description

Po-Hsu Lin po-hsu.lin at canonical.com
Tue Jan 16 08:14:38 UTC 2018


Now the backports / derivatives in tracking bug description looks like:
backports: 1743363,1743364
derivatives: 1743365,1743367,1743368,1743369,1743370,174337

Add a 'bug' string before the bug number for launchpad to treat it as a link.
Add a '(package-name)' after it, so we could know what it is from a glance.

The new style is expected to be:
backports: bug 1743363 (linux-aws), bug 1743364 (linux-lts-xenial)
derivatives: bug 1743365 (linux-aws), bug 1743367 (linux-euclid), bug 1743368 (linux-gke)...

Signed-off-by: Po-Hsu Lin <po-hsu.lin at canonical.com>
---
 stable/start-sru-cycle | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/stable/start-sru-cycle b/stable/start-sru-cycle
index 0cd58778..695ed849 100755
--- a/stable/start-sru-cycle
+++ b/stable/start-sru-cycle
@@ -116,7 +116,7 @@ class Crankers():
                             print('     -> EE: Bug creation failed (does the package exist in the archive?)!')
                             continue
                         bug.tags.append(cycle_tag)
-                        backports.append(str(bug.id))
+                        backports.append('bug {} ({})'.format(str(bug.id), backport_project))
                         bug.tags.append('kernel-sru-backport-of-%s' % master_bug.id)
 
                     derivatives = []
@@ -127,13 +127,13 @@ class Crankers():
                             print('     -> EE: Bug creation failed (does the package exist in the archive?)!')
                             continue
                         bug.tags.append(cycle_tag)
-                        derivatives.append(str(bug.id))
+                        derivatives.append('bug {} ({})'.format(str(bug.id), derivative_project))
                         bug.tags.append('kernel-sru-derivative-of-%s' % master_bug.id)
 
                     description = master_bug.description
                     description += '\n'
-                    description += 'backports: %s\n' % ','.join(backports)
-                    description += 'derivatives: %s\n' % ','.join(derivatives)
+                    description += 'backports: %s\n' % ', '.join(backports)
+                    description += 'derivatives: %s\n' % ', '.join(derivatives)
                     master_bug.description = description
 
             retval = 0
-- 
2.11.0





More information about the kernel-team mailing list