[RFC][PATCH] ktl/ubuntu.py: fix series lookup for custom backports
Juerg Haefliger
juerg.haefliger at canonical.com
Fri Oct 13 07:59:27 UTC 2017
This fixes the verify-release-ready release check for linux-aws and
linux-gcp. But the generic checking of all packages against the list of
backports concerns me a little. Can we have backport packages with the
same name in different series? Specifically, there is a linux-aws
derivative in xenial and a linux-aws xenial backport for trusty.
On the other hand, modifying verify-release-ready every time we add
another of these custom thingies isn't the best thing to do.
...Juerg
On 10/13/2017 09:55 AM, Juerg Haefliger wrote:
> Currently, only linux-azure is checked against the list of backports.
> Relax that check and compare all packages against the list of backports,
> and if found, return its target series.
>
> Signed-off-by: Juerg Haefliger <juerg.haefliger at canonical.com>
> ---
> ktl/ubuntu.py | 19 +++++++++----------
> 1 file changed, 9 insertions(+), 10 deletions(-)
>
> diff --git a/ktl/ubuntu.py b/ktl/ubuntu.py
> index 884ed9765605..0bc2aa182125 100644
> --- a/ktl/ubuntu.py
> +++ b/ktl/ubuntu.py
> @@ -234,16 +234,15 @@ class Ubuntu:
> retval = entry['name']
> series_version = entry['series_version']
>
> - # linux-azure is a backport that doesn't contain the 'upstream'
> - # series number on the package name, so we need to look for it
> - # first and then look for the target series.
> - if package.startswith('linux-azure'):
> - for entry in self.db.values():
> - try:
> - if len(set(['linux', series_version]) & set(entry['backport-packages'][package])) == 2:
> - retval = entry['name']
> - except KeyError:
> - pass
> + # Check if the package is a 'custom' backport and if so, return
> + # its target series name
> + for entry in self.db.values():
> + try:
> + if entry['backport-packages'][package] == ['linux', series_version]:
> + retval = entry['name']
> + break
> + except KeyError:
> + pass
>
> return retval
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 845 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20171013/6055b24c/attachment.sig>
More information about the kernel-team
mailing list