All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ross Burton <Ross.Burton@arm.com>
To: "João Marcos Costa" <joaomarcos.costa@bootlin.com>
Cc: "quentin.schulz@cherry.de" <quentin.schulz@cherry.de>,
	"openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>,
	"thomas.petazzoni@bootlin.com" <thomas.petazzoni@bootlin.com>
Subject: Re: [OE-core] [PATCH 1/3] ovmf: simplify PACKAGECONFIG's default value
Date: Thu, 14 May 2026 10:57:21 +0000	[thread overview]
Message-ID: <B94EE239-0488-4DF5-80CD-81B9EC3A630E@arm.com> (raw)
In-Reply-To: <16ac5a86-680c-46c6-8079-92a0880f5def@cherry.de>

On 11 May 2026, at 14:19, Quentin Schulz via lists.openembedded.org <quentin.schulz=cherry.de@lists.openembedded.org> 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

  reply	other threads:[~2026-05-14 10:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-11  9:29 [PATCH 0/3] ovmf: add some rework to the recipe João Marcos Costa
2026-05-11  9:29 ` [PATCH 1/3] ovmf: simplify PACKAGECONFIG's default value João Marcos Costa
2026-05-11 13:19   ` Quentin Schulz
2026-05-14 10:57     ` Ross Burton [this message]
2026-05-14 12:40       ` [OE-core] " Joao Marcos Costa
2026-05-11  9:29 ` [PATCH 2/3] ovmf: drop gcc-12 specific BUILD_CFLAGS setting João Marcos Costa
2026-05-11 13:27   ` Quentin Schulz
2026-05-11 13:40     ` [OE-core] " Joao Marcos Costa
2026-05-11 13:52       ` Quentin Schulz
2026-05-11 14:00         ` Joao Marcos Costa
2026-05-12  8:46           ` Richard Purdie
2026-05-12  9:02             ` Joao Marcos Costa
2026-05-12  9:06               ` Richard Purdie
2026-05-12  9:17                 ` Joao Marcos Costa
2026-05-12  9:51                   ` Richard Purdie
2026-05-11  9:29 ` [PATCH 3/3] ovmf: add support for Clang toolchain João Marcos Costa

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=B94EE239-0488-4DF5-80CD-81B9EC3A630E@arm.com \
    --to=ross.burton@arm.com \
    --cc=joaomarcos.costa@bootlin.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=quentin.schulz@cherry.de \
    --cc=thomas.petazzoni@bootlin.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.