base.bbclass: Fix dangling NATIVELSBSTRING
cover base.bbclass: Fix dangling NATIVELSBSTRING
The following changes since commit 0049f6757f6f956fb4cc77b3df6a672c20b53cf4:
oeqa qemurunner.py: try to avoid reading one character at a time (2023-02-10 09:25:41 +0000)
are available in the Git repository at:
https://git.openembedded.org/openembedded-core-contrib rbt/lsb
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/lsb
Robert Yang (1):
base.bbclass: Fix dangling NATIVELSBSTRING
meta/classes-global/base.bbclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
Signature · 1 line
2.39.0
PATCH 1/1 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.
--- meta/classes-global/base.bbclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
meta/classes-global/base.bbclass +6 -1
@@ -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)
Signature · 1 line
2.39.0
Quoted 28 lines · Robert Yang
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 <[email protected]>--- meta/classes-global/base.bbclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)meta/classes-global/base.bbclass +0
-0@@ -226,7 +226,12 @@ BUILDCFG_FUNCS[type] = "list" def buildcfg_vars(d): statusvars = oe.data.typed_value('BUILDCFG_VARS', d)
meta/classes-global/base.bbclass BUILDCFG_FUNCS[type] = "list" · line 236
Quoted 10 lines
meta/classes-global/base.bbclass +6
-1for 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)
The uninative code runs "late" and this is an known issue, there is an open bug for it if I remember correctly.
I don't really want to put hacks into the BUILDCFG display code to work around it since it is just going to make it less clear what is going on and is also likely to break if we evern change the way NATIVELSBSTRING is set. If you really don't like this, we should fix it properly some other way rather than work around it.
Cheers,
Richard
Hi RP,
Quoted 43 lines · Richard Purdie
Quoted 28 lines · Robert Yang
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 <[email protected]>--- meta/classes-global/base.bbclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)meta/classes-global/base.bbclass +0
-0@@ -226,7 +226,12 @@ BUILDCFG_FUNCS[type] = "list" def buildcfg_vars(d): statusvars = oe.data.typed_value('BUILDCFG_VARS', d)meta/classes-global/base.bbclass BUILDCFG_FUNCS[type] = "list" · line 236
Quoted 10 lines
meta/classes-global/base.bbclass +6
-1for 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)The uninative code runs "late" and this is an known issue, there is an open bug for it if I remember correctly.
Quoted 5 lines
I don't really want to put hacks into the BUILDCFG display code to work around it since it is just going to make it less clear what is going on and is also likely to break if we evern change the way NATIVELSBSTRING is set. If you really don't like this, we should fix it properly some other way rather than work around it.
I'd like to drop the patch since it doesn't affect the build.
// Robert
Quoted 4 lines
Cheers,
Richard