* [PATCH 1/2] native: Fix DISTRO_FEATURES backfill handling in native case
@ 2026-02-18 14:41 Richard Purdie
2026-02-18 14:41 ` [PATCH 2/2] native: Use dynamic filtering for PROVIDES Richard Purdie
0 siblings, 1 reply; 2+ messages in thread
From: Richard Purdie @ 2026-02-18 14:41 UTC (permalink / raw)
To: openembedded-core
Currently, features listed in DISTRO_FEATURES_FILTER_NATIVE are not supported
for DISTRO_FEATURES_BACKFILL as the two variables interact badly. We now have
need to add some features to backfill which are in the filter_native case.
This patch fixes the handling by appuing the backfill, then zeroing the variable
once they are applied. This leads to them being correctly filtered.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/classes-recipe/native.bbclass | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta/classes-recipe/native.bbclass b/meta/classes-recipe/native.bbclass
index b3411d20ca2..d109907841c 100644
--- a/meta/classes-recipe/native.bbclass
+++ b/meta/classes-recipe/native.bbclass
@@ -130,8 +130,10 @@ python native_virtclass_handler () {
# Set features here to prevent appends and distro features backfill
# from modifying native distro features
features = set(d.getVar("DISTRO_FEATURES_NATIVE").split())
+ oe.utils.features_backfill("DISTRO_FEATURES", d)
filtered = set(bb.utils.filter("DISTRO_FEATURES", d.getVar("DISTRO_FEATURES_FILTER_NATIVE"), d).split())
d.setVar("DISTRO_FEATURES", " ".join(sorted(features | filtered)))
+ d.setVar("DISTRO_FEATURES_BACKFILL", "")
classextend = e.data.getVar('BBCLASSEXTEND') or ""
if "native" not in classextend:
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] native: Use dynamic filtering for PROVIDES
2026-02-18 14:41 [PATCH 1/2] native: Fix DISTRO_FEATURES backfill handling in native case Richard Purdie
@ 2026-02-18 14:41 ` Richard Purdie
0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2026-02-18 14:41 UTC (permalink / raw)
To: openembedded-core
Currently, PROVIDES is one of the few variables left which isn't handled by
filter code dynamically. This lead to bugs if for example you have a
PACKAGECONFIG value which references DISTRO_FEATURES, and DISTRO_FEATURES
is being set in the the native case late by backfill. The early expansion
of the value means it can use an incorrect DISTRO_FEATURES value leading to
confusing errors.
Convert the code to use a filter in common with the other code in the class.
This does lead to some behaviour differences outside OE-Core in meta-oe for
example where the PROVIDES of gd-native changed:
"gd-native gd-native-tools"
to
"gd-native gd-tools-native"
where the change is a clear improvement in correctness.
This fixes issues when DISTRO_FEATURES has backfill options in place in
the native case.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/classes-recipe/native.bbclass | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/meta/classes-recipe/native.bbclass b/meta/classes-recipe/native.bbclass
index d109907841c..98466b1902d 100644
--- a/meta/classes-recipe/native.bbclass
+++ b/meta/classes-recipe/native.bbclass
@@ -166,18 +166,7 @@ python native_virtclass_handler () {
d.setVarFilter("PACKAGES", "native_filter(val, '" + pn + "', '" + bpn + "')")
d.setVarFilter("PACKAGES_DYNAMIC", "native_filter(val, '" + pn + "', '" + bpn + "', regex=True)")
- provides = e.data.getVar("PROVIDES")
- nprovides = []
- for prov in provides.split():
- if prov.find(pn) != -1:
- nprovides.append(prov)
- elif not prov.endswith("-native"):
- nprovides.append(prov + "-native")
- else:
- nprovides.append(prov)
- e.data.setVar("PROVIDES", ' '.join(nprovides))
-
-
+ d.setVarFilter("PROVIDES", "native_filter(val, '" + pn + "', '" + bpn + "')")
}
addhandler native_virtclass_handler
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-18 14:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-18 14:41 [PATCH 1/2] native: Fix DISTRO_FEATURES backfill handling in native case Richard Purdie
2026-02-18 14:41 ` [PATCH 2/2] native: Use dynamic filtering for PROVIDES Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox