diff options
author | Adriana Kobylak <anoo@us.ibm.com> | 2021-01-15 00:37:48 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2021-01-28 00:57:38 +0300 |
commit | 8c5ef9e353ea6ee86772fd6839dc3c907f191d8a (patch) | |
tree | ff729914581c5b5e8db3cf70cd7ee5a9e64cedca /meta-phosphor/recipes-core/os-release/os-release.bbappend | |
parent | d47f9a099a4ef992351237b0f2f562b5dc843397 (diff) | |
download | openbmc-8c5ef9e353ea6ee86772fd6839dc3c907f191d8a.tar.xz |
os-release: Remove --long from git describe
The --long was added to address the issue described in
openbmc/openbmc#1692 where a tag name may not have a '-' separator, ex:
v1.99.6. The parsing of the tag name would then fail. But the parsing
was recently refactored so it no longer fails, we can remove the extra
verbosity of the VERSION_ID field now.
In simplified form, the previous parsing:
"version = versionList[0] + "-" + versionList[1]"
Current parsing that doesn't fail if versionList[1] doesn't exist:
"versionList[0:2]"
Tested: Created a tag 2.10.99 and verified the build succeeded and
the output of os-release reflected the change in the VERSION_ID:
ID=openbmc-witherspoon
NAME="Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro)"
VERSION="2.10.99"
VERSION_ID=2.10.99
PRETTY_NAME="Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro) 2.10.99"
BUILD_ID="2.10.99"
OPENBMC_TARGET_MACHINE="witherspoon"
Change-Id: I502c72a5c3bfd49913b34bbaa041086c11845421
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Diffstat (limited to 'meta-phosphor/recipes-core/os-release/os-release.bbappend')
-rw-r--r-- | meta-phosphor/recipes-core/os-release/os-release.bbappend | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta-phosphor/recipes-core/os-release/os-release.bbappend b/meta-phosphor/recipes-core/os-release/os-release.bbappend index 5d4a4afbcd..4c9e157a22 100644 --- a/meta-phosphor/recipes-core/os-release/os-release.bbappend +++ b/meta-phosphor/recipes-core/os-release/os-release.bbappend @@ -15,7 +15,7 @@ def run_git(d, cmd): bb.warn("Unexpected exception from 'git' call: %s" % e) pass -VERSION_ID := "${@run_git(d, 'describe --dirty --long')}" +VERSION_ID := "${@run_git(d, 'describe --dirty')}" VERSION = "${@'-'.join(d.getVar('VERSION_ID').split('-')[0:2])}" BUILD_ID := "${@run_git(d, 'describe --abbrev=0')}" |