Hi Richard, On Thu, Jun 15, 2023 at 08:03:44AM +0100, Richard Purdie wrote: > On Sun, 2023-06-11 at 17:16 +0200, Alexander Kanavin wrote: > > Doesn't += override the earlier ?= > > It depends. If ?= is parsed first, += will append. If the ?= is parsed > after +=, the ?= will not happen as the variable has a value. > > > (or ??=), > > += would override ??=
In which kind of cases would ??= be preferred? For basic recipes in oe-core and other layers, setting variables with basic assignment and then appending it with += should be enough unless machine or other override specific qualifiers are needed :append:machine. Using plain :append without any qualifiers is annoying in downstream layers which try to fine tune upstream open source meta layers and recipes and still remain compatible to apply security and other updates, including full version/branch upgrades. I see some, for me, bad examples of ??= to set initial PACKAGECONFIG, for example. Downstream layers would need to use PACKAGECONFIG:append to add some feature to upstream defaults since += would require to fully control the PACKAGECONFIG in a bbappend. I would prefer ?= for that so that a += could be used to add an extra non-default feature but keep all the rest in upstream defaults. This gets even more tricky with intermediate layers which might want to enable features across recipes and layers, e.g. "selinux". Now they'd have to use use :append to make sure "selinux" is added to PACKAGECONFIG everywhere and no other upstream defaults are changed. And then product layers who 'know better' to for example drop some features would need to :remove them explicitly and can't fully overwrite the PACKAGECONFIG with a simple assignment in a bbappend. Messy. Staring a lot of "bitbake -e" ouput needed. Cheers, -Mikko
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#182839): https://lists.openembedded.org/g/openembedded-core/message/182839 Mute This Topic: https://lists.openembedded.org/mt/99423382/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
