On Sat, Jul 04, 2020 at 03:18:43PM +0200, Jacob Kroon wrote:
> On 7/3/20 4:31 PM, Richard Purdie wrote:
> >I'm growing increasingly concerned about default value assignments in
> >OE. The basic problem is people don't understand the way default values
> >work and the mechanisms we do have don't let people do all the things
> >they want to do.
> >
> >I'll pick on the example found by Ross/Jon in meta-arm. If you set:
> >
> >BB_HASHBASE_WHITELIST += "X"
> >
> >in layer.conf, the BB_HASHBASE_WHITELIST ?= "Y" from bitbake.conf is
> >lost as by then the variable already has a value. Another user reported
> >the same issue today in irc.
> >
> >Another example would be whether recipes should set PACKAGECONFIG with
> >"=", "?=" or "??=". All work well for some scenarios and not for
> >others, often depending on whether the user wants to add to or remove
> >from the original value, or change it to something else entirely.
> >
> >We then have a complete lack of standarisation of how bbclass files set
> >default values.
> >
> >I don't have a fully thought out solution to all of this at this point.
> >I think it is clear out existing syntax isn't really capable of
> >expressing everything we need though and confusion current reigns.
> >
> >I was partly responsible for introducing "??=" as a syntax for
> >"default" value. The problem with it is that "+=" doesn't modify it, a
> >deliberate (and necessary) choice at the time which makes it pretty
> >ineffective.
> >
> >If bitbake started tracking whether an assignment has been used on a
> >given value vs. just += and =+ it would be possible to have an operator
> >which could have a behaviour more in line with what users expect?
> >
> >Whether that could/should be some new assignment operator, or whether
> >we could "rescue" ??= I'm also not sure. A new operator would certainly
> >be safer.
> >
> >Does anyone else:
> >
> >a) Agree there is a usability issue here?
> 
> The example you mention with BB_HASHBASE_WHITELIST, it sounds to me
> like the underlying problem is that the order of file inclusion is
> not apparent to people, and not that there is any confusion about
> the ?=/+= operators ?

I'd like to add my 2 cents.

While the complexity of operators may be somewhat confusing to new users or 
developers of the project, alongside with the order of file inclusion and 
different stages of parsing and processing variables...

But I tend to agree with Martin and Jacob here, that it is rather the matter 
of education, experience and examining the environment, than it is a call 
to action for adding yet another mechanism for setting variables and their 
defaults. One example of past attempts to fix or workaround user's issues 
like this was introduction of BACKFILL processing, which is even less 
intuitive and more confusing, IMHO...

So, I would be very cautious about adding yet another operator.

-- 
Denys
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#1102): 
https://lists.openembedded.org/g/openembedded-architecture/message/1102
Mute This Topic: https://lists.openembedded.org/mt/75280300/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-architecture/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to