All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Peter Kjellerstedt" <peter.kjellerstedt@axis.com>
To: Andre McCurdy <armccurdy@gmail.com>,
	Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: OE Core mailing list <openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [PATCH] file: Remove unneccessary override of PACKAGECONFIG for native
Date: Thu, 14 May 2020 16:09:14 +0000	[thread overview]
Message-ID: <9cb273ff020547c782b8dd42a4c85470@XBOX03.axis.com> (raw)
In-Reply-To: <CAJ86T=X5=DGSw30e3os8bm=T5V6UXHMhLGPjB=xykyqjY-ijog@mail.gmail.com>

> -----Original Message-----
> From: Andre McCurdy <armccurdy@gmail.com>
> Sent: den 14 maj 2020 00:49
> To: Richard Purdie <richard.purdie@linuxfoundation.org>
> Cc: Peter Kjellerstedt <peter.kjellerstedt@axis.com>; OE Core mailing
> list <openembedded-core@lists.openembedded.org>
> Subject: Re: [OE-core] [PATCH] file: Remove unneccessary override of
> PACKAGECONFIG for native
> 
> On Wed, May 13, 2020 at 2:31 PM Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > On Wed, 2020-05-13 at 12:30 -0700, Andre McCurdy wrote:
> > > Yes. Unfortunately making recipes robust for users who want to change
> > > PACKAGECONFIG values doesn't seem to be a high priority for oe-core.
> > > Why else would default PACKAGECONFIG values be assigned with ??=
> > > instead of ?= other than as a trap for new users?
> >
> > I'm not sure I understand that, equally I'm tired so I'll assume I'm
> > just missing something.
> >
> > I will say that there is no intention to make OE-Core hard to use or
> > not robust, its only as good a the people contributing make it. In this
> > case I'm not sure I understand/see the problem.
> >
> > If we should be using ?= instead of ??= then I'm open to an explanation
> > why and patches to improve things.
> 
> If the default is assigned with ??= then trying to add to it with +=
> results in the default value being lost. If the default is assigned
> with ?= then adding to it with += works as expected.
> 
> To robustly enable a new PACKAGECONFIG option, users need to learn to
> use PACKAGECONFIG_append (and obviously learn about the leading space
> requirement there too) and not to try PACKAGECONFIG +=.
> 
> The reference manual does at least have an example which uses _append.
> However it doesn't mention that += isn't safe or that _append will
> affect native(sdk) and therefore _append_class-target is the safest
> approach.
> 
> > Unfortunately we do have quite some legacy and ??= vs ?= has been
> > troublesome in the many different contexts we have (recipe, class,
> > conf, inc and so on).

Actually, I have always wondered why the recipes in OE-Core typically 
use PACKAGECONFIG ??= "..." when no other variables (in the recipes) 
are defined that way. After all, if I want to override the default 
value in a bbappend as PACKAGECONFIG = "...", that works just as well 
if the variable is defined using = rather than ?= or ??=. And if I do 
it in local.conf, I would typically do it using PACKAGECONFIG_pn-foo 
and then it also doesn't matter whether = or ??= was used to define 
the default in the recipe. Add to that the complications with not 
being able to use += together with ??= in a sensible way, it even 
makes less sense.

For the record, in our own recipes we use PACKAGECONFIG = "..." in the 
recipes and that would be my recommendation for OE-Core as well.

//Peter


      reply	other threads:[~2020-05-14 16:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12 21:42 [PATCH] file: Remove unneccessary override of PACKAGECONFIG for native Peter Kjellerstedt
2020-05-12 22:19 ` [OE-core] " Andre McCurdy
2020-05-13 17:14   ` Peter Kjellerstedt
2020-05-13 19:30     ` Andre McCurdy
2020-05-13 21:31       ` Richard Purdie
2020-05-13 22:48         ` Andre McCurdy
2020-05-14 16:09           ` Peter Kjellerstedt [this message]

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=9cb273ff020547c782b8dd42a4c85470@XBOX03.axis.com \
    --to=peter.kjellerstedt@axis.com \
    --cc=armccurdy@gmail.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.