summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/classes/image_version.bbclass
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2018-02-08 20:26:58 -0500
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-02-23 13:43:40 -0500
commitd1ba4e535e6a70d4a9faad28b1b3db299f637aa4 (patch)
tree12e7325b6d430ad5070d3e46977a2927d24b00f7 /meta-phosphor/classes/image_version.bbclass
parentb598a9268e7a75c5e01ee7ff3543beee5d045762 (diff)
downloadtalos-openbmc-d1ba4e535e6a70d4a9faad28b1b3db299f637aa4.tar.gz
talos-openbmc-d1ba4e535e6a70d4a9faad28b1b3db299f637aa4.zip
image_version: Add missing os-release dependency
Any recipe inheriting image_version must have a dependency on os-release to ensure the sysroot is populated before attempting to get the version out of it. Also read the version out of the target sysroot rather than the host sysroot. os-release does not have a native variant. Tested: Built image and verified in witherspoon qemu Change-Id: I8d79280a75577eff48314f0f57c0015e1d6738ef Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-phosphor/classes/image_version.bbclass')
-rw-r--r--meta-phosphor/classes/image_version.bbclass4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta-phosphor/classes/image_version.bbclass b/meta-phosphor/classes/image_version.bbclass
index f9abb5fc9..a4b4c3d6f 100644
--- a/meta-phosphor/classes/image_version.bbclass
+++ b/meta-phosphor/classes/image_version.bbclass
@@ -1,9 +1,11 @@
# Base image version class extension
+DEPENDS_append = " os-release"
+
def do_get_version(d):
import configparser
import io
- path = d.getVar('STAGING_DIR_HOST', True) + d.getVar('sysconfdir', True)
+ path = d.getVar('STAGING_DIR_TARGET', True) + d.getVar('sysconfdir', True)
path = os.path.join(path, 'os-release')
parser = configparser.SafeConfigParser(strict=False)
parser.optionxform = str
OpenPOWER on IntegriCloud