From: Quentin Schulz <quentin.schulz@cherry.de>
To: "João Marcos Costa" <joaomarcos.costa@bootlin.com>,
openembedded-core@lists.openembedded.org
Cc: thomas.petazzoni@bootlin.com, qi.chen@windriver.com
Subject: Re: [PATCH v2 3/3] machine: include: arm: simplify conditional operations with bb.utils.filter
Date: Mon, 27 Apr 2026 16:21:30 +0200 [thread overview]
Message-ID: <17be66c8-363a-4010-818b-67c42d51a825@cherry.de> (raw)
In-Reply-To: <20260427130846.96013-4-joaomarcos.costa@bootlin.com>
Hi João,
On 4/27/26 3:08 PM, João Marcos Costa wrote:
> Some configuration files use bb.utils.contains to check for a string
> inside a variable, and return the exact same string if true.
>
> This can be simplified by a call to bb.utils.filter, since the result is
> the same, and the inline is shorter.
>
> Replace "bb.utils.contains(A, 'a', 'a', '', d)" by "bb.utils.filter(A, 'a', d)".
>
> bb.utils.filter() does not return the string with a leading space, and
> this is handled by a leading space outside of the helper. This
> workaround, however, has its limitations: the leading space is always
> added. To avoid any potential issues, use .strip() when dereferencing
> TUNE_CCARGS_MFPU in the if statements.
>
I'm not sure this is worth it as this pattern means next time we add a
new tunefeatures we'll likely follow the same pattern. This means that
even though the existing machines won't set this new tunefeature,
they'll likely rebuild a few things because TUNE_CCARGS_MFPU will have
an additional space in it (but maybe BitBake parsing is smart enough to
realize that only
TUNE_CCARGS, ARMPKGSFX_FPU and TUNE_CCARGS_MFLOAT use it and they won't
change if there's only one space difference, so:
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Thanks!
Quentin
next prev parent reply other threads:[~2026-04-27 14:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 13:08 [PATCH v2 0/3] Simplify conditional operations with bb.utils.filter João Marcos Costa
2026-04-27 13:08 ` [PATCH v2 1/3] meta: simplify " João Marcos Costa
2026-04-27 14:13 ` Quentin Schulz
2026-04-27 13:08 ` [PATCH v2 2/3] classes-global: insane.bbclass : " João Marcos Costa
2026-04-27 14:15 ` Quentin Schulz
2026-04-27 13:08 ` [PATCH v2 3/3] machine: include: arm: " João Marcos Costa
2026-04-27 14:21 ` Quentin Schulz [this message]
2026-05-04 8:36 ` [OE-core] " Richard Purdie
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=17be66c8-363a-4010-818b-67c42d51a825@cherry.de \
--to=quentin.schulz@cherry.de \
--cc=joaomarcos.costa@bootlin.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=qi.chen@windriver.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox