Re: [OE-core] [PATCH] meta: simplify conditional operations with bb.utils.filter

Joao Marcos Costa
2026-04-27T11:02:12Z

Hello,

(...)

>
> VAR_1 = bb.utils.filter(VAR_2, ....)
>
> When you do this, this gives people an impression that VAR1 and VAR2 are
> conceptually related.
>
> For example, PACKAGECONFIG & DISTRO_FEATURES both control the way
> recipes are built, they are switches for recipes, and they are related.
> Many PACKAEGECONFIG items' names are selected to be the same with
> DISTRO_FEAETURES, e.g., pam, acl., because they are the most reasonable
> names.

I see what you mean now, thanks!

> But if you look at ERROR_QA, the items names really have no relations
> with DISTRO_FEATURES. The usrmerge QA check was actually checking
> filesystem hierarchy. If we consider the possible sbin -> bin merge in
> the future, the QA check name should be something like
> "filesystem-hierarchy-check".

Indeed.

>
> To be clear, I'm not against *all* parts of this patch. For example, you
> have:
>
>  PACKAGECONFIG ?= "\
> -    ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '',
> d)} \
> +    ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)} \
>  "
>
> And I think it's a correct change.
>
> I think the problematic ones are ERROR_QA and RDEPENDS.

Well, PACKAGECONFIG is also related to runtime, not only build-time.
What I mean is you can specify additional runtime dependencies in the
PACKAGECONFIG declaration/definition [1], so one could argue that
RDEPENDS and PACKAGECONFIG are not so conceptually distant as the
ERROR_QA and DISTRO_FEATURES example.

> Regards,
> Qi

Thanks for the review, and for the clarification as well.

[1]
https://docs.yoctoproject.org/ref-manual/variables.html#term-PACKAGECONFIG
--
Best regards,
João Marcos Costa