[kteam-tools][PATCHv2 3/3] create-stable-tracker: --version 'patchset' option for arbitrary patch sets

Kamal Mostafa kamal at canonical.com
Mon Aug 27 17:30:03 UTC 2018


For collections of patches which do not have an associated upstream stable
version number (i.e. where the upstream stable series has reached EOL)
this option creates an LP tracking bug with a date-stamped in the title
in place of the upstream stable version number, e.g.:

    "Bionic update: upstream stable patchset 2018-07-06"

Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 stable/create-stable-tracker | 30 +++++++++++++++++-------------
 1 file changed, 17 insertions(+), 13 deletions(-)

diff --git a/stable/create-stable-tracker b/stable/create-stable-tracker
index 0816e33..4f8e39f 100755
--- a/stable/create-stable-tracker
+++ b/stable/create-stable-tracker
@@ -3,6 +3,7 @@
 
 from sys                                import argv
 from getopt                             import getopt, GetoptError
+from datetime                           import datetime
 from ktl.utils                          import stdo, eout
 from ktl.std_app                        import StdApp
 from ktl.debian                         import Debian
@@ -49,11 +50,12 @@ class Cmdline:
         stdo("        --staging        Use the staging LP server to create the bug. This is just for       \n")
         stdo("                         testing and will go away when the database is reset.                \n")
         stdo("                                                                                             \n")
-        stdo("        --version        What is the version number of the stable release. This is used      \n")
-        stdo("                         for the bug title, to determine the series, etcl.                   \n")
+        stdo("        --version        Version number of the upstream stable release,                      \n")
+        stdo("                         or 'patchset' for an arbitrary set of patches.                      \n")
         stdo("                                                                                             \n")
         stdo("    Examples:                                                                                \n")
-        stdo("        %s --staging                                                                         \n" % self.cfg['app_name'])
+        stdo("        %s --staging --version v4.15.8                                                       \n" % self.cfg['app_name'])
+        stdo("        %s --staging --version patchset                                                      \n" % self.cfg['app_name'])
 
     # process
     #
@@ -135,15 +137,21 @@ class CreateTrackingBug(StdApp):
 
             #-------------------------------------------------------------------------------------
             # B U G   W O R K
-            print("version: %s" % self.cfg['version'])
             version = self.cfg['version']
+            if version == 'patchset':
+                datestr = datetime.now().strftime("%Y-%m-%d")
+                update_desc = "upstream stable patchset %s" % datestr
+            else:
+                update_desc = "%s upstream stable release" % version
             changelog = Debian.changelog(local=True)
             series_name = changelog[0]['release']
             if series_name == 'UNRELEASED':
                 series_name = changelog[1]['release']
 
             # Title:
-            title = "%s update to %s stable release" % (series_name.title(), self.cfg['version'])
+            title = "%s update: %s" % (series_name.title(), update_desc)
+
+            print(title)
 
             # Repository - see if it's a tree we maintain
             if "-ckt" in version:
@@ -160,17 +168,13 @@ class CreateTrackingBug(StdApp):
        in scope to the Ubuntu SRU process, e.g., each patch has to
        demonstrably fix a bug, and each patch is vetted by upstream
        by originating either directly from a mainline/stable Linux tree or
-       a minimally backported form of that patch. The %s upstream stable
-       patch set is now available. It should be included in the Ubuntu
-       kernel as well.
+       a minimally backported form of that patch. The following upstream
+       stable patches should be included in the Ubuntu kernel:
 
        %s
+       from %s
 
-    TEST CASE: TBD
-
-       The following patches from the %s stable release shall be applied:
-
-            """ % (version, repository, version)
+            """ % (update_desc, repository)
 
             bug = self.lp.create_bug(project='ubuntu', package=changelog[0]['package'], title=title, description=description)
 
-- 
2.7.4





More information about the kernel-team mailing list