diff options
authorRobert Yang <liezhi.yang@windriver.com>2023-02-14 15:40:37 +0800
committerRobert Yang <liezhi.yang@windriver.com>2023-02-14 00:25:02 -0800
commit8e3f56d34bb5941970bce8e43bfa43d38b2ba4b8 (patch)
parent0049f6757f6f956fb4cc77b3df6a672c20b53cf4 (diff)
base.bbclass: Fix dangling NATIVELSBSTRINGrbt/lsb
Fixed: $ rm -fr tmp; bitbake quilt-native -n Build Configuration: [snip] NATIVELSBSTRING = "ubuntu-18.04" [snip] And when run bitbake again: $ bitbake quilt-native -n Build Configuration: NATIVELSBSTRING = "universal" It has been changed from ubuntu-18.04 to universal on the same host and build directory, this is because it is overridded by NATIVELSBSTRING. This patch makes it print the correct value. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass
index 64e805c947..cf42d9d4d2 100644
--- a/meta/classes-global/base.bbclass
+++ b/meta/classes-global/base.bbclass
@@ -226,7 +226,12 @@ BUILDCFG_FUNCS[type] = "list"
def buildcfg_vars(d):
statusvars = oe.data.typed_value('BUILDCFG_VARS', d)
for var in statusvars:
- value = d.getVar(var)
+ # NATIVELSBSTRING var may have been overridden with "universal", so
+ # get actual host distribution id and version
+ if var == 'NATIVELSBSTRING':
+ value = lsb_distro_identifier(d)
+ else:
+ value = d.getVar(var)
if value is not None:
yield '%-20s = "%s"' % (var, value)