diff options
author | Jason M. Bills <jason.m.bills@intel.com> | 2022-01-07 00:50:19 +0300 |
---|---|---|
committer | Jason M. Bills <jason.m.bills@intel.com> | 2022-01-14 22:27:54 +0300 |
commit | 1fc0d70f658da30091bcd49f9bf29aecd6b99ba7 (patch) | |
tree | 0b45c3beaa9874facc4ed1a2395a31e42be0135d /meta-openbmc-mods/meta-common/recipes-core/os-release | |
parent | 32777eec25d2c527a62e5ffab90a3dfef35855aa (diff) | |
download | openbmc-1fc0d70f658da30091bcd49f9bf29aecd6b99ba7.tar.xz |
Update to internal 0.86
Signed-off-by: Jason M. Bills <jason.m.bills@intel.com>
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-core/os-release')
-rw-r--r-- | meta-openbmc-mods/meta-common/recipes-core/os-release/version-vars.inc | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-core/os-release/version-vars.inc b/meta-openbmc-mods/meta-common/recipes-core/os-release/version-vars.inc index 872e78eba..df43dae89 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/os-release/version-vars.inc +++ b/meta-openbmc-mods/meta-common/recipes-core/os-release/version-vars.inc @@ -55,12 +55,24 @@ python() { # If no tag, provide default version if meta_vers.startswith('fatal:'): - meta_vers = '{}-0.0-0-g0'.format(gen) + ver_list = obmc_vers.split('-') + obmc_tag_list = ver_list[1].split('.') + obmc_major_revision = 0 + obmc_minor_revision = 0 + obmc_minor_spare = 0 + try: + obmc_major_revision = int(obmc_tag_list[0]) + obmc_minor_revision = int(obmc_tag_list[1]) + obmc_minor_spare = int(ver_list[2]) + except ValueError: + bb.warn("Invalid obmc_vers: {}".format(obmc_vers)) + meta_vers = '{}-{}.{}-{}-g{}'.format(gen,obmc_major_revision, + obmc_minor_revision,obmc_minor_spare,obmc_hash[0:6]) meta_hash = irun_git(d, mibase, 'rev-parse HEAD') # If no hash, provide default if meta_hash.startswith('fatal:'): - meta_hash = '00000000' + meta_hash = obmc_hash[0:7] version_id = '{}-{}'.format(meta_vers, obmc_hash[0:7]) if version_id: d.setVar('VERSION_ID', version_id) |