From ccbdf2041b9f45e01f04d268a01ed4431c831176 Mon Sep 17 00:00:00 2001 From: Walter Werner SCHNEIDER Date: Thu, 6 Nov 2025 14:01:20 +0200 Subject: [PATCH] features_check: improve error message for missing required DISTRO_FEATURES 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 Signed-off-by: Mathieu Dubois-Briand --- meta/classes-recipe/features_check.bbclass | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/meta/classes-recipe/features_check.bbclass b/meta/classes-recipe/features_check.bbclass index 1e0eaa4eedb..46d8243cb6b 100644 --- a/meta/classes-recipe/features_check.bbclass +++ b/meta/classes-recipe/features_check.bbclass @@ -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: -- 2.47.3