All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Peter Kjellerstedt" <peter.kjellerstedt@axis.com>
To: "bitbake-devel@lists.openembedded.org"
	<bitbake-devel@lists.openembedded.org>
Subject: Re: [bitbake-devel] [PATCH] providers: Use new override syntax when handling pn- "override"
Date: Thu, 26 Aug 2021 17:45:17 +0000	[thread overview]
Message-ID: <2f401da4d3e646e7b2aaecd9ac871acb@axis.com> (raw)
In-Reply-To: <169EEBD79694E731.9667@lists.openembedded.org>

> -----Original Message-----
> From: bitbake-devel@lists.openembedded.org <bitbake-
> devel@lists.openembedded.org> On Behalf Of Peter Kjellerstedt
> Sent: den 26 augusti 2021 19:37
> To: bitbake-devel@lists.openembedded.org
> Subject: [bitbake-devel] [PATCH] providers: Use new override syntax when
> handling pn- "override"
> 
> Make versionVariableMatch() support pn-foo overrides using the new
> override syntax.
> 
> Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> ---
>  bitbake/lib/bb/providers.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/bitbake/lib/bb/providers.py b/bitbake/lib/bb/providers.py
> index 516d45e4aa..8c1c31a5c5 100644
> --- a/bitbake/lib/bb/providers.py
> +++ b/bitbake/lib/bb/providers.py
> @@ -94,7 +94,7 @@ def versionVariableMatch(cfgData, keyword, pn):
> 
>      # pn can contain '_', e.g. gcc-cross-x86_64 and an override cannot
>      # hence we do this manually rather than use OVERRIDES
> -    ver = cfgData.getVar("%s_VERSION_pn-%s" % (keyword, pn))
> +    ver = cfgData.getVar("%s_VERSION:pn-%s" % (keyword, pn))
>      if not ver:
>          ver = cfgData.getVar("%s_VERSION_%s" % (keyword, pn))
>      if not ver:

I do not know why PREFERRED_VERSION_<foo> & co have not been changed to 
the new syntax, but I will argue that at least PREFERRED_VERSION_pn-<foo> 
should be changed to PREFERRED_VERSION:pn-<foo> as per above to not cause 
confusion. Though I am unsure if anyone actually uses that format, at 
least I didn't know it was even supported until I found the above code.

//Peter


       reply	other threads:[~2021-08-26 17:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <169EEBD79694E731.9667@lists.openembedded.org>
2021-08-26 17:45 ` Peter Kjellerstedt [this message]
2021-08-27  8:31   ` [bitbake-devel] [PATCH] providers: Use new override syntax when handling pn- "override" 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=2f401da4d3e646e7b2aaecd9ac871acb@axis.com \
    --to=peter.kjellerstedt@axis.com \
    --cc=bitbake-devel@lists.openembedded.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.