On 11 May 2026, at 14:19, Quentin Schulz via lists.openembedded.org
<[email protected]> wrote:
>
>> -PACKAGECONFIG ??= ""
>> -PACKAGECONFIG += "${@bb.utils.filter('MACHINE_FEATURES', 'tpm', d)}"
>> -PACKAGECONFIG += "${@bb.utils.contains('MACHINE_FEATURES', 'tpm2', 'tpm',
>> '', d)}"
>> +PACKAGECONFIG ?= "${@bb.utils.contains_any('MACHINE_FEATURES', 'tpm tpm2',
>> 'tpm', '', d)}"
>
> Just a heads up that this is *not* equivalent.
>
> The use of ??= meant that any ?= (and ??=) parsed anywhere before that line
> is meant that it would set the default values, and then we would append to
> those default values tpm.
>
> Now by merging those into a single ?=, a previous ?= will override this new
> ?= operator, meaning tpm won't make it to the PACKAGECONFIG even if the
> MACHINE_FEATURES is set to tpm/tpm2. Also, an earlier ??= won't do anything
> anymore.
>
> Whether that's an actual issue, I don't know, but you may break users.
>
> Merging the two += into a single one would truly be equivalent.
The old value _was_ very un-idiomatic but the replacement is too.
However:
PACKAGECONFIG ??= "${@bb.utils.contains_any('MACHINE_FEATURES', 'tpm tpm2',
'tpm', '', d)}”
Is idiomatic and whilst a change of behaviour, it has the expected behaviour.
Can you use ??= and clarify that whilst this changes the behaviour in edge
cases, what we prefer is consistency between recipes.
Ross
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#237024):
https://lists.openembedded.org/g/openembedded-core/message/237024
Mute This Topic: https://lists.openembedded.org/mt/119253357/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-