[Merge] lp:~sil2100/ubuntu-archive-tools/sru-stop-using-v-d into lp:ubuntu-archive-tools

Brian Murray brian at ubuntu.com
Mon Jun 19 17:34:55 UTC 2017


I still think we are losing one change to the bug tags and I've added an inline comment about that.

Diff comments:

> 
> === modified file 'sru-review'
> --- sru-review	2017-04-27 20:32:35 +0000
> +++ sru-review	2017-06-19 07:51:29 +0000
> @@ -299,23 +299,27 @@
>                'Is there anything left to sponsor?' % num)
>  
>      if not sourcepkg or 'linux' not in sourcepkg:
> +        # this dance is needed due to
> +        # https://bugs.launchpad.net/launchpadlib/+bug/254901
>          btags = bug.tags
> -        for t in ('verification-failed', 'verification-done'):
> +        for t in ('verification-failed', 'verification-failed-%s' % release,
> +                  'verification-done', 'verification-done-%s' % release):
>              if t in btags:
> -                # this dance is needed due to
> -                # https://bugs.launchpad.net/launchpadlib/+bug/254901
>                  tags = btags
>                  tags.remove(t)
>                  bug.tags = tags
> +
> +        if 'verification-needed' not in btags:
> +            btags.append('verification-needed')
> +            bug.tags = btags
> +

In the for loop before this we create a variable btags which is really bug.tags. If a v-failed* or v-done* tag is in btags we then create tags and remove the v-failed* or v-done* tag from the tags. However, this change is lost because in the lines above you append 'v-needed' to btags which did not have the v-failed* or v-done* tag removed. I don't think this is the intended outcome.

> +        needed_tag = 'verification-needed-%s' % release
> +        if needed_tag not in btags:
> +            btags.append(needed_tag)
> +            bug.tags = btags
> +
>          bug.lp_save()
>  
> -        if 'verification-needed' not in btags:
> -            # this dance is needed due to
> -            # https://bugs.launchpad.net/launchpadlib/+bug/254901
> -            tags = btags
> -            tags.append('verification-needed')
> -            bug.tags = tags
> -            bug.lp_save()
>  
>      text = ('Hello %s, or anyone else affected,\n\n' %
>              re.split(r'[,\s]', bug.owner.display_name)[0])


-- 
https://code.launchpad.net/~sil2100/ubuntu-archive-tools/sru-stop-using-v-d/+merge/325326
Your team Ubuntu Package Archive Administrators is requested to review the proposed merge of lp:~sil2100/ubuntu-archive-tools/sru-stop-using-v-d into lp:ubuntu-archive-tools.



More information about the ubuntu-archive mailing list