On Tue, 2023-02-14 at 00:28 -0800, Robert Yang wrote: > 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.y...@windriver.com> > --- > 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 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)
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
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#177129): https://lists.openembedded.org/g/openembedded-core/message/177129 Mute This Topic: https://lists.openembedded.org/mt/96955945/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-