[PATCH 1/1] cranky: Fix tag name of backports of derivatives
Khaled Elmously
khalid.elmously at canonical.com
Sun Oct 28 19:03:11 UTC 2018
On 2018-10-28 21:00:49 , Khalid Elmously wrote:
> Backports of derivatives have a debian folder named in the form of "<variant>-<release>"
> instead of just "<variant". When the name of that folder is used to generate the prefix of the closing tag, the tag ends up being something like "Ubuntu-gcp-xenial-4.15.0-1024.25_16.04.1"
> instead of "Ubuntu-gcp-4.15.0-1024.25_16.04.1"
>
> Fix it by removing the "-<variant>" part of the dirname
Sorry, that should say: removing the "-<release>" part of the dirname
>
> Signed-off-by: Khalid Elmously <khalid.elmously at canonical.com>
> ---
> cranky/cranky-close | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/cranky/cranky-close b/cranky/cranky-close
> index 9b2b5a92..7c52c942 100755
> --- a/cranky/cranky-close
> +++ b/cranky/cranky-close
> @@ -2,6 +2,7 @@
>
> import os
> import sys
> +import re
>
> # Add ../libs to the Python search path
> sys.path.append(os.path.realpath(os.path.join(os.path.dirname(__file__), os.pardir, 'libs')))
> @@ -67,7 +68,8 @@ class Close():
> elif "lts" in s.changelog[0]['package']:
> s.prefix = "Ubuntu-lts-"
> else:
> - s.prefix = "Ubuntu-{}-".format(s.branch)
> + fixed_branch = re.sub(r'-.*', '', s.branch)
> + s.prefix = "Ubuntu-{}-".format(fixed_branch)
> s.version = s.changelog[0]['version']
>
> def commit(s):
> --
> 2.17.1
>
More information about the kernel-team
mailing list