From acec76fc819f9294faad65ee0370be2df1dd7869 Mon Sep 17 00:00:00 2001 From: Kevin Hilman Date: Sat, 6 Oct 2018 11:58:50 +0200 Subject: agljobtemplate: allow cmdline build-version to override Allow the --build-version cmdline option to override the other ways of generating the kernel.version metadata. Change-Id: I9da1de7fdc795d888a7b864965755821a53e2830 Signed-off-by: Kevin Hilman --- utils/agljobtemplate.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/utils/agljobtemplate.py b/utils/agljobtemplate.py index 493407f..42f2bc9 100644 --- a/utils/agljobtemplate.py +++ b/utils/agljobtemplate.py @@ -112,7 +112,7 @@ class Agljobtemplate(object): url_base = section[1] # If not set, create a build_version from other args if (not build_version) and (url_branch) and (url_version): - build_version = 'AGL-' + build_type + '-' + url_branch + '-' + url_version + build_version_default = 'AGL-' + build_type + '-' + url_branch + '-' + url_version url_fragment = '' if (build_type != 'default'): @@ -150,8 +150,7 @@ class Agljobtemplate(object): if build_version is not None: job['kernel_version'] = build_version - - if url_version: + elif url_version: kernel_version = url_version # if this is an 'int', then it was --patchset try: @@ -159,7 +158,9 @@ class Agljobtemplate(object): except: pass job['kernel_version'] = kernel_version - + elif build_version_default: + job['kernel_version'] = build_version_default + if url_branch: vcs_branch = url_branch # if this is an 'int', then it was --changeid -- cgit 1.2.3-korg