summaryrefslogtreecommitdiff
path: root/meta-phosphor/recipes-core
diff options
context:
space:
mode:
authorAdriana Kobylak <anoo@us.ibm.com>2022-08-04 17:13:26 +0300
committerPatrick Williams <patrick@stwcx.xyz>2022-08-08 22:17:27 +0300
commitbde7dbef4d62d9fd83e60a4e1f14755cb1283e3a (patch)
tree96857e2cc788cb25ff9bbbc33c5586a21f9ffe67 /meta-phosphor/recipes-core
parent4e1206bf07e00bb18f6528241889982969c9cb10 (diff)
downloadopenbmc-bde7dbef4d62d9fd83e60a4e1f14755cb1283e3a.tar.xz
Initialize EXTENDED_VERSION to a default
The EXTENDED_VERSION in the os-release file was an optional field. Initialize it to a default since there will be a Redfish property for extended version information that can be mapped to the ExtendedVersion D-Bus property, choose the VERSION_ID value as the default since that's what's used for the Version D-Bus property, and set it to a weak variable so it can still be overwritten. Need a new function to get the EXTENDED_VERSION from the os-release file instead of just from a bitbake variable. It is still possible to overwrite the default value in a conf or bbappend file, same as BUILD_ID. Note that the extended version was and still is surrounded by quotes, since this is a free-format string that may contain spaces. Tested: - Verified the extended version string was the same as version in: - os-release: VERSION_ID=2.13.0-dev-613-g1e16157845 EXTENDED_VERSION="2.13.0-dev-613-g1e16157845" - MANIFEST: version=2.13.0-dev-613-g1e16157845 ExtendedVersion="2.13.0-dev-613-g1e16157845" - D-Bus properties: .ExtendedVersion property s "2.13.0-dev-613-g1e16157845" .Version property s "2.13.0-dev-613-g1e16157845" - Verified that extended version could be set from a conf file, example: in meta-ibm/conf/machine/witherspoon.conf: EXTENDED_VERSION = "My Extended Version" - Verified that extended version could be set from a bbappend, example: in meta-ibm/recipes-core/os-release/os-release.bbappend: EXTENDED_VERSION:witherspoon = "My_Extended_Version_from_bbappend" Change-Id: I74adf08239c9cd08768be9c5d9cd3384e703da95 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Diffstat (limited to 'meta-phosphor/recipes-core')
-rw-r--r--meta-phosphor/recipes-core/os-release/os-release.bbappend1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-core/os-release/os-release.bbappend b/meta-phosphor/recipes-core/os-release/os-release.bbappend
index c1dda480ff..50c3787e4a 100644
--- a/meta-phosphor/recipes-core/os-release/os-release.bbappend
+++ b/meta-phosphor/recipes-core/os-release/os-release.bbappend
@@ -25,6 +25,7 @@ def run_git(d, cmd):
# indirection via PHOSPHOR_OS_RELEASE_DISTRO_VERSION.
PHOSPHOR_OS_RELEASE_DISTRO_VERSION := "${@run_git(d, 'describe --dirty')}"
DISTRO_VERSION ??= "${PHOSPHOR_OS_RELEASE_DISTRO_VERSION}"
+EXTENDED_VERSION ??= "${PHOSPHOR_OS_RELEASE_DISTRO_VERSION}"
VERSION = "${@'-'.join(d.getVar('VERSION_ID').split('-')[0:2])}"