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? b) Think we should try and do something? If so, what should we do, what is the behaviour we really need/want? Cheers, Richard
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#1092): https://lists.openembedded.org/g/openembedded-architecture/message/1092 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]] -=-=-=-=-=-=-=-=-=-=-=-
