Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>,
	Andre McCurdy <armccurdy@gmail.com>
Cc: Ross Burton <ross@burtonini.com>,
	OE Core mailing list <openembedded-core@lists.openembedded.org>
Subject: RE: [OE-core] [PATCH v2 2/2] vim: set PACKAGECONFIG idiomatically
Date: Fri, 3 Dec 2021 13:59:29 +0000	[thread overview]
Message-ID: <9425bc823580451c885178a688b08353@axis.com> (raw)
In-Reply-To: <61ee860e605c5e1db1aac7cc1c8cee15c23a4071.camel@linuxfoundation.org>

> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Richard Purdie
> Sent: den 3 december 2021 11:07
> To: Andre McCurdy <armccurdy@gmail.com>
> Cc: Ross Burton <ross@burtonini.com>; OE Core mailing list <openembedded-
> core@lists.openembedded.org>
> Subject: Re: [OE-core] [PATCH v2 2/2] vim: set PACKAGECONFIG idiomatically
> 
> On Fri, 2021-12-03 at 01:39 -0800, Andre McCurdy wrote:
> > On Wed, Dec 1, 2021 at 2:33 PM Richard Purdie
> > <richard.purdie@linuxfoundation.org> wrote:
> > >
> > > On Tue, 2021-11-30 at 13:45 -0800, Andre McCurdy wrote:
> > > > On Tue, Nov 30, 2021 at 1:20 PM Ross Burton <ross@burtonini.com>
> wrote:
> > > > >
> > > > > On Tue, 30 Nov 2021 at 19:32, Andre McCurdy <armccurdy@gmail.com>
> wrote:
> > > > > > This isn't equivalent - it will cause a change in behaviour for
> anyone
> > > > > > using PACKAGECONFIG += "foo" from a .bbappend.
> > > > >
> > > > > Correct, but this is likely the only recipe in the greater
> ecosystem
> > > > > which has this behaviour, so I'm not that bothered to be honest.
> :)
> > > >
> > > > The only recipe? There are many recipes which set a default
> > > > PACKAGECONFIG with ?= and many which set it with ??=. Your change is
> > > > effectively switching the vim recipe from one approach to the other.
> > > > The fact that adding PACKAGECONFIG options from a .bbappend with +=
> > > > sometimes works OK and sometimes not is a source of confusion for
> new
> > > > users.
> > > >
> > > > You are right that no one seems to care though...
> > >
> > > Some of us very much do care, it is actually bothering me a lot and
> I've posted
> > > several times on the architecture list about this kind of issue.
> > >
> > > We haven't worked out what we can agree to do about it though :(.
> >
> > As a first, very easy, step, make a statement here on the mailing list
> > that all PACKAGECONFIG defaults should be assigned with ?= instead of
> > ??= and fix the recipes in oe-core accordingly.
> 
> The question is whether we all agree on that and I'm not sure we all do.

I definitely agree that using "??=" in the recipe for PACKAGECONFIG is 
a bad idea. In all our own recipes we use "=" so that is what I would 
prefer, but "?=" is ok and it would alleviate the need to use 
PACKAGECONFIG:append in bbappends instead of "PACKAGECONFIG +=". 

The reason I think "=" is better than "?=" is that if you want to 
override the PACKAGECONFIG in a bbappend, using "=" a second time will 
work fine, and if you want to do the override in a configuration file 
like local.conf, you would use PACKAGECONFIG:pn-foo, which also would 
override whatever the recipe set using "=". So unless I am missing a 
use case, there really isn't a need to use "?=".

> > As a second step, the parser could generate a warning (or even an
> > error) if any variable is assigned to with only ??= and += (the end
> > result of that combination is not what any user would expect and I
> > doubt if any legitimate use case relies on it).
> 
> Would be interesting to see if there is valid use so it is probably worth
> some tests/analysis. The ??= operator never did what I'd hoped it would in
> reality sadly.
> 
> Cheers,
> 
> Richard

//Peter


  reply	other threads:[~2021-12-03 13:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30 16:53 [PATCH v2 1/2] vim: fix CVE-2021-3968 and CVE-2021-3973 Ross Burton
2021-11-30 16:53 ` [PATCH v2 2/2] vim: set PACKAGECONFIG idiomatically Ross Burton
2021-11-30 19:32   ` [OE-core] " Andre McCurdy
2021-11-30 21:20     ` Ross Burton
2021-11-30 21:45       ` Andre McCurdy
2021-12-01 22:33         ` Richard Purdie
2021-12-03  9:39           ` Andre McCurdy
2021-12-03 10:06             ` Richard Purdie
2021-12-03 13:59               ` Peter Kjellerstedt [this message]
2021-12-03 18:12                 ` Andre McCurdy
2021-12-03 18:07               ` Andre McCurdy
2021-12-06 17:16                 ` Andre McCurdy

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=9425bc823580451c885178a688b08353@axis.com \
    --to=peter.kjellerstedt@axis.com \
    --cc=armccurdy@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    --cc=ross@burtonini.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox