@@ -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))
+ details = ''
+ if kind == 'DISTRO' and d.getVar('DISTRO') == 'nodistro':
+ details = '; Did you forget to set DISTRO?'
+ raise bb.parse.SkipRecipe("missing required %s feature%s '%s' (not in %s_FEATURES%s)"
+ % (kind.lower(), 's' if len(missing) > 1 else '', ' '.join(missing), kind, details))
+
conflict_features = set((d.getVar('CONFLICT_' + kind + '_FEATURES') or '').split())
if conflict_features:
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. Signed-off-by: Walter Werner SCHNEIDER <contact@schnwalter.eu> --- This is related to my other patch that adds features_check to core-image-weston. It improves the message a bit, so that newcomers don't start adding DISTRO_FEATURES instead of setting a proper DISTRO for their project. meta/classes-recipe/features_check.bbclass | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)