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

Stefan Bader stefan.bader at canonical.com
Mon Aug 27 10:42:24 UTC 2018


On 24.08.2018 21:47, Kamal Mostafa wrote:
> 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 | 34 +++++++++++++++++++---------------
>  1 file changed, 19 insertions(+), 15 deletions(-)
> 
> diff --git a/stable/create-stable-tracker b/stable/create-stable-tracker
> index 8b56fc9..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)
>  
> @@ -195,13 +199,13 @@ class CreateTrackingBug(StdApp):

I do not understand the changes made in this hunk. At least not why they would
be made along with the other changes.

-Stefan

>              ubuntu = lp.distributions["ubuntu"]
>              sc = ubuntu.series_collection
>              for s in sc:
> -                if s.name == series_name.title():
> +                if s.name == series_name:
>                      nomination = bug.lpbug.addNomination(target=s)
>                      if nomination.canApprove():
>                          nomination.approve()
>  
>              if 'staging' in self.cfg:
> -                print("https://bugs.qastaging.launchpad.net/bugs/%s" % (bug.id))
> +                print("https://bugs.%s.launchpad.net/bugs/%s" % (self.defaults['launchpad_services_root'], bug.id))
>              else:
>                  print("https://bugs.launchpad.net/bugs/%s" % (bug.id))
>  
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20180827/e9135d5a/attachment.sig>


More information about the kernel-team mailing list