From: "João Marcos Costa" <joaomarcos.costa@bootlin.com>
To: openembedded-core@lists.openembedded.org
Cc: thomas.petazzoni@bootlin.com, quentin.schulz@cherry.de,
qi.chen@windriver.com,
"João Marcos Costa" <joaomarcos.costa@bootlin.com>
Subject: [PATCH v2 2/3] classes-global: insane.bbclass : simplify conditional operations with bb.utils.filter
Date: Mon, 27 Apr 2026 15:08:45 +0200 [thread overview]
Message-ID: <20260427130846.96013-3-joaomarcos.costa@bootlin.com> (raw)
In-Reply-To: <20260427130846.96013-1-joaomarcos.costa@bootlin.com>
The append override on ERROR_QA uses 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)".
Signed-off-by: João Marcos Costa <joaomarcos.costa@bootlin.com>
---
meta/classes-global/insane.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass
index feddfe0335..04700be71c 100644
--- a/meta/classes-global/insane.bbclass
+++ b/meta/classes-global/insane.bbclass
@@ -46,7 +46,7 @@ ERROR_QA ?= "\
${CHECKLAYER_REQUIRED_TESTS}"
# Add usrmerge QA check based on distro feature
-ERROR_QA:append = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', ' usrmerge', '', d)}"
+ERROR_QA:append = " ${@bb.utils.filter('DISTRO_FEATURES', 'usrmerge', d)}"
WARN_QA:append:layer-core = " missing-metadata missing-maintainer"
FAKEROOT_QA = "host-user-contaminated"
--
2.47.0
next prev parent reply other threads:[~2026-04-27 13:09 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 ` João Marcos Costa [this message]
2026-04-27 14:15 ` [PATCH v2 2/3] classes-global: insane.bbclass : " 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
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=20260427130846.96013-3-joaomarcos.costa@bootlin.com \
--to=joaomarcos.costa@bootlin.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=qi.chen@windriver.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox