From: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
To: Qi.Chen@windriver.com, openembedded-core@lists.openembedded.org
Cc: thomas.petazzoni@bootlin.com
Subject: Re: [OE-core] [PATCH] meta: simplify conditional operations with bb.utils.filter
Date: Mon, 27 Apr 2026 11:30:56 +0200 [thread overview]
Message-ID: <fa2f6061-1c36-484c-9f7b-00691d9bf7fb@bootlin.com> (raw)
In-Reply-To: <25ab1432-5860-4985-8827-e1a672f66a9a@windriver.com>
Hello, Chen
On 4/27/26 10:49, Chen Qi via lists.openembedded.org wrote:
> When using filter for two different things, isn't it a little strange?
>
> Take the first change you made as an example:
>
> -ERROR_QA:append ="${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '
> usrmerge', '', d)}"
> +ERROR_QA:append = " ${@bb.utils.filter('DISTRO_FEATURES', 'usrmerge', d)}"
>
> Previously, the line is very clear. It reads like: if DISTRO_FEATURES
> contains 'usrmerge', append ' usrmerge' to ERROR_QA.
So far, this applies to bb.utils.filter() as a whole. Unless your point
is about the space in ' usrmerge'.
> After the change, it reads like: filter usrmerge from DISTRO_FEATRUES to
> ERROR_QA.
> By doing this, you're connecting these two variables (DISTRO_FEATURES &
> ERROR_QA) conceptually.
I'm not sure I interpret/read this line the same way you do. Once again,
unless I misunderstood your point, the way you read bb.utils.filter()
applies to every use of such helper.
How different is this ERROR_QA case from the other occurences of
bb.utils.filter() in my patch (i.e., in the *.bb), or even in oe-core?
> And the leading space is also a tiny problem.
After Quentin's comment, I double-checked and ERROR_QA is not handled in
the same way as TUNE_CCARGS_MFPU, so the extra leading space should be
fine. I agree, however, that it's not very nice to add it unconditionally.
One more thing: could you please clarify what you mean by "two different
things"? I'm not sure to follow, even with the example. The use case is
still one and only: check if the string is in the variable, and if so,
return it.
> Regards,
> Qi
Thanks!
--
Best regards,
João Marcos Costa
next prev parent reply other threads:[~2026-04-27 9:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-24 15:17 [PATCH] meta: simplify conditional operations with bb.utils.filter João Marcos Costa
2026-04-24 15:40 ` [OE-core] " Quentin Schulz
2026-04-27 8:38 ` Joao Marcos Costa
2026-04-27 10:45 ` Quentin Schulz
2026-04-27 10:53 ` Joao Marcos Costa
2026-04-27 8:49 ` ChenQi
2026-04-27 9:30 ` Joao Marcos Costa [this message]
2026-04-27 10:05 ` ChenQi
2026-04-27 11:01 ` Joao 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=fa2f6061-1c36-484c-9f7b-00691d9bf7fb@bootlin.com \
--to=joaomarcos.costa@bootlin.com \
--cc=Qi.Chen@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--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