Skip to contentSkip to conversation

features_check: warn about nodistro in message

PATCH In review Walter Werner SCHNEIDER 2 participants 2 messages Oct 29, 2025 – Nov 3, 2025

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 features_check: warn about nodistro in message

When a required distro feature is missing and DISTRO is set to nodistro, provide a clear hint to the user. This helps newcomers starting projects without a DISTRO configured who attempt to build images like core-image-weston that depend on specific distro features.

---
v1 -> v2: Changed the error message.

As pointed out by others, the message might not be technically correct, but I think it's good enough for new users, experienced users will know that they can either update the DISTRO_FEATURES or use a different DISTRO, new users will start asking question why they have "nodistro" and wether or not that has something to do with the missing DISTRO_FEATURES. This is how the error message used to look like:

ERROR: Nothing PROVIDES 'core-image-weston' core-image-weston was skipped: missing required distro feature 'wayland' (not in DISTRO_FEATURES)

And now it looks like this:

ERROR: Nothing PROVIDES 'core-image-weston' core-image-weston was skipped: using DISTRO 'nodistro', which is missing required DISTRO_FEATURES: 'wayland'

 meta/classes-recipe/features_check.bbclass | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
meta/classes-recipe/features_check.bbclass +7 -2
index 1e0eaa4eed..36ed4fa4be 100644
@@ -42,8 +42,13 @@ python () {
         if required_features:
             missing = set.difference(required_features, features)
             if missing:
-                raise bb.parse.SkipRecipe("missing required %s feature%s '%s' (not in %s_FEATURES)"
-                    % (kind.lower(), 's' if len(missing) > 1 else '', ' '.join(missing), kind))
+                if kind == 'DISTRO':
+                    raise bb.parse.SkipRecipe("using %s '%s', which is missing required %s_FEATURES: '%s'"
+                        % (kind, d.getVar(kind), kind, ' '.join(missing)))
+                else:
+                    raise bb.parse.SkipRecipe("missing required %s_FEATURES: '%s'"
+                        % (kind, ' '.join(missing)))
+
 
         conflict_features = set((d.getVar('CONFLICT_' + kind + '_FEATURES') or '').split())
         if conflict_features:
#1 lore raw

Hi Walter,

Can you rewrite the commit message to reflect what the new code does?

Cheers,
Ross

Quoted 62 lines · Walter Werner SCHNEIDER via lists.openembedded.org

When a required distro feature is missing and DISTRO is set to nodistro, provide a clear hint to the user. This helps newcomers starting projects without a DISTRO configured who attempt to build images like core-image-weston that depend on specific distro features.

---
v1 -> v2: Changed the error message.

As pointed out by others, the message might not be technically correct, but I think it's good enough for new users, experienced users will know that they can either update the DISTRO_FEATURES or use a different DISTRO, new users will start asking question why they have "nodistro" and wether or not that has something to do with the missing DISTRO_FEATURES. This is how the error message used to look like:

ERROR: Nothing PROVIDES 'core-image-weston' core-image-weston was skipped: missing required distro feature 'wayland' (not in DISTRO_FEATURES)

And now it looks like this:

ERROR: Nothing PROVIDES 'core-image-weston' core-image-weston was skipped: using DISTRO 'nodistro', which is missing required DISTRO_FEATURES: 'wayland'

meta/classes-recipe/features_check.bbclass | 9 +++++++--

1 file changed, 7 insertions(+), 2 deletions(-)
meta/classes-recipe/features_check.bbclass +7 -3
index 1e0eaa4eed..36ed4fa4be 100644
@@ -42,8 +42,13 @@ python () {
        if required_features:
            missing = set.difference(required_features, features)
            if missing:
-                raise bb.parse.SkipRecipe("missing required %s feature%s '%s' (not in %s_FEATURES)"
-                    % (kind.lower(), 's' if len(missing) > 1 else '', ' '.join(missing), kind))
+                if kind == 'DISTRO':
+                    raise bb.parse.SkipRecipe("using %s '%s', which is missing required %s_FEATURES: '%s'"
+                        % (kind, d.getVar(kind), kind, ' '.join(missing)))
+                else:
+                    raise bb.parse.SkipRecipe("missing required %s_FEATURES: '%s'"
+                        % (kind, ' '.join(missing)))
+
 
        conflict_features = set((d.getVar('CONFLICT_' + kind + '_FEATURES') or '').split())
        if conflict_features:
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#225456): https://lists.openembedded.org/g/openembedded-core/message/225456
Mute This Topic: https://lists.openembedded.org/mt/116012468/6875888
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-