* [PATCH 1/3] bitbake.conf: Document renamed default machine/distro features vars
2026-04-03 8:38 [PATCH 0/3] Follow up patches for default features Paul Barker
@ 2026-04-03 8:38 ` Paul Barker
2026-04-03 8:38 ` [PATCH 2/3] oelib: utils: Support opting out of all features Paul Barker
2026-04-03 8:38 ` [PATCH 3/3] oelib: utils: Fix description of set_difference Paul Barker
2 siblings, 0 replies; 4+ messages in thread
From: Paul Barker @ 2026-04-03 8:38 UTC (permalink / raw)
To: openembedded-core; +Cc: Paul Barker
Adding support for opting out of any machine/distro features has
obsoleted a few variables, add them to BB_RENAMED_VARIABLES so that
users get an error if they try to use the old names.
Signed-off-by: Paul Barker <paul@pbarker.dev>
---
meta/conf/bitbake.conf | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 84450386d984..9fcd16615db5 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -121,6 +121,13 @@ BB_RENAMED_VARIABLES[WHITELIST_GPL-3.0+] = "is deprecated, convert to INCOMPATIB
BB_RENAMED_VARIABLES[WHITELIST_LGPL-3.0] = "is deprecated, convert to INCOMPATIBLE_LICENSE_EXCEPTIONS = '<pkg>:LGPL-3.0-only'"
BB_RENAMED_VARIABLES[WHITELIST_LGPL-3.0+] = "is deprecated, convert to INCOMPATIBLE_LICENSE_EXCEPTIONS = '<pkg>:LGPL-3.0-or-later'"
+BB_RENAMED_VARIABLES[DISTRO_FEATURES_DEFAULT] = "is obsolete, add all default features to DISTRO_FEATURES_DEFAULTS"
+BB_RENAMED_VARIABLES[DISTRO_FEATURES_BACKFILL] = "is obsolete, add all default features to DISTRO_FEATURES_DEFAULTS"
+BB_RENAMED_VARIABLES[DISTRO_FEATURES_BACKFILL_CONSIDERED] = "DISTRO_FEATURES_OPTED_OUT"
+BB_RENAMED_VARIABLES[MACHINE_FEATURES_DEFAULT] = "is obsolete, add all default features to MACHINE_FEATURES_DEFAULTS"
+BB_RENAMED_VARIABLES[MACHINE_FEATURES_BACKFILL] = "is obsolete, add all default features to MACHINE_FEATURES_DEFAULTS"
+BB_RENAMED_VARIABLES[MACHINE_FEATURES_BACKFILL_CONSIDERED] = "MACHINE_FEATURES_OPTED_OUT"
+
##################################################################
# Architecture-dependent build variables.
##################################################################
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] oelib: utils: Support opting out of all features
2026-04-03 8:38 [PATCH 0/3] Follow up patches for default features Paul Barker
2026-04-03 8:38 ` [PATCH 1/3] bitbake.conf: Document renamed default machine/distro features vars Paul Barker
@ 2026-04-03 8:38 ` Paul Barker
2026-04-03 8:38 ` [PATCH 3/3] oelib: utils: Fix description of set_difference Paul Barker
2 siblings, 0 replies; 4+ messages in thread
From: Paul Barker @ 2026-04-03 8:38 UTC (permalink / raw)
To: openembedded-core; +Cc: Paul Barker
If '*' is present as a separate token in DISTRO_FEATURES_OPTED_OUT or
MACHINE_FEATURES_OPTED_OUT, interpret this as opting out of all default
features.
If '*' is part of a larger word, this is not treated specially - 'FOO*'
will not trigger removal of all features.
This is implemented in set_difference() so that the behaviour can be
reused in other similar processing we may need to do in the future.
Signed-off-by: Paul Barker <paul@pbarker.dev>
---
meta/lib/oe/utils.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 5c722d230842..639c037c1a01 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -93,6 +93,13 @@ def set_difference(variable1, variable2, d):
s2 = "b c d"
s3 = set_difference(s1, s2)
=> s3 = "a"
+
+ If '*' is present as a separate token (not part of a larger identifier) in
+ the second operand, this is interpreted as "remove all entries":
+ s1 = "a b c"
+ s2 = "*"
+ s3 = set_difference(s1, s2)
+ => s3 = ""
"""
val1 = d.getVar(variable1)
if not val1:
@@ -104,6 +111,9 @@ def set_difference(variable1, variable2, d):
val1 = set(val1.split())
val2 = set(val2.split())
+ if "*" in val2:
+ return ""
+
# Return a sorted string to ensure that the result is consistent between
# parser runs.
return " ".join(sorted(val1 - val2))
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 3/3] oelib: utils: Fix description of set_difference
2026-04-03 8:38 [PATCH 0/3] Follow up patches for default features Paul Barker
2026-04-03 8:38 ` [PATCH 1/3] bitbake.conf: Document renamed default machine/distro features vars Paul Barker
2026-04-03 8:38 ` [PATCH 2/3] oelib: utils: Support opting out of all features Paul Barker
@ 2026-04-03 8:38 ` Paul Barker
2 siblings, 0 replies; 4+ messages in thread
From: Paul Barker @ 2026-04-03 8:38 UTC (permalink / raw)
To: openembedded-core; +Cc: Paul Barker
Forgot to change the description when copy-pasting from set_intersect().
Signed-off-by: Paul Barker <paul@pbarker.dev>
---
meta/lib/oe/utils.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 639c037c1a01..ed5dd5f45049 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -86,7 +86,7 @@ def set_intersect(variable1, variable2, d):
def set_difference(variable1, variable2, d):
"""
Expand both variables, interpret them as lists of strings, and return the
- intersection as a flattened string.
+ difference as a flattened string.
For example:
s1 = "a b c"
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread