[kteam-tools PATCH] link-to-tracker: update tb description with package version

Kleber Sacilotto de Souza kleber.souza at canonical.com
Thu May 4 15:54:14 UTC 2017


When the tracking bug is created by 'stable/start-sru-cycle', the title
and the description contain the placeholder '<version to be filled>'.
When 'link-to-tacker' is run, it updates only the tracking bug title
with the package version. Make it so that the description is also
updated.

Signed-off-by: Kleber Sacilotto de Souza <kleber.souza at canonical.com>
---
 stable/link-to-tracker | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/stable/link-to-tracker b/stable/link-to-tracker
index d3d84a4b..0b28cf29 100755
--- a/stable/link-to-tracker
+++ b/stable/link-to-tracker
@@ -167,7 +167,8 @@ class Tracking():
             # Pull the entire changelog file into a list
             #
             changelog = Debian.changelog(local=True)
-            title = "%s: %s -proposed tracker" % (changelog[0]['package'], changelog[0]['version'])
+            package_version = changelog[0]['version']
+            title = "%s: %s -proposed tracker" % (changelog[0]['package'], package_version)
 
             changelog, changelog_path = Debian.raw_changelog(local=True)
             with open(changelog_path, 'r') as f:
@@ -183,6 +184,7 @@ class Tracking():
 
             lpbug = s.launchpad.bugs[bugid]
             lpbug.title = title
+            lpbug.description = lpbug.description.replace('<version to be filled>', package_version)
             lpbug.lp_save()
 
             task = tasks_by_name['prepare-package'].lp_task
-- 
2.11.0





More information about the kernel-team mailing list