]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
features_check: improve error message for missing required DISTRO_FEATURES
authorWalter Werner SCHNEIDER <contact@schnwalter.eu>
Thu, 6 Nov 2025 12:01:20 +0000 (14:01 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 10 Nov 2025 17:56:48 +0000 (17:56 +0000)
The original message for REQUIRED_DISTRO_FEATURES entries that were
missing from DISTRO_FEATURES was:

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

For newcomers, this is error message doesn't provide enough information to
identify the root cause, which could be: using the wrong DISTRO. This patch
changes the error message to include the distro name:

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

Signed-off-by: Walter Werner SCHNEIDER <contact@schnwalter.eu>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
meta/classes-recipe/features_check.bbclass

index 1e0eaa4eedb50fbfb09f8a1c56631db3782db6c2..46d8243cb6b34f44a03345f7e34948444a3ca7c2 100644 (file)
@@ -42,8 +42,12 @@ 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 feature%s '%s' (not in %s_FEATURES)"
+                        % (kind.lower(), 's' if len(missing) > 1 else '', ' '.join(missing), kind))
 
         conflict_features = set((d.getVar('CONFLICT_' + kind + '_FEATURES') or '').split())
         if conflict_features: