From 8e3f56d34bb5941970bce8e43bfa43d38b2ba4b8 Mon Sep 17 00:00:00 2001 From: Robert Yang Date: Tue, 14 Feb 2023 15:40:37 +0800 Subject: [PATCH] base.bbclass: Fix dangling NATIVELSBSTRING 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 --- meta/classes-global/base.bbclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass index 64e805c9476..cf42d9d4d22 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) -- 2.47.2