All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Yang <liezhi.yang@windriver.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>,
	openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH 1/1] base.bbclass: Fix dangling NATIVELSBSTRING
Date: Tue, 14 Feb 2023 17:44:12 +0800	[thread overview]
Message-ID: <d4b98ea2-efc7-cecf-b92c-3f1fa2f842c5@windriver.com> (raw)
In-Reply-To: <ee78e0537a53ae57ee4c4cf8249b7cfa1124c8ce.camel@linuxfoundation.org>

Hi RP,

On 2/14/23 16:44, Richard Purdie wrote:
> 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.yang@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.

I'd like to drop the patch since it doesn't affect the build.

// Robert

> 
> Cheers,
> 
> Richard


  reply	other threads:[~2023-02-14  9:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-14  8:28 [PATCH 0/1] base.bbclass: Fix dangling NATIVELSBSTRING Robert Yang
2023-02-14  8:28 ` [PATCH 1/1] " Robert Yang
2023-02-14  8:44   ` [OE-core] " Richard Purdie
2023-02-14  9:44     ` Robert Yang [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-01-06 12:04 [PATCH 0/1] " Robert Yang
2021-01-06 12:04 ` [PATCH 1/1] " Robert Yang
2021-01-07 23:34   ` [OE-core] " Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d4b98ea2-efc7-cecf-b92c-3f1fa2f842c5@windriver.com \
    --to=liezhi.yang@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.