From cbe9d2f748125aa2dffc829570d46f8dbc1781a4 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Mon, 26 Jan 2015 15:32:23 +0000 Subject: classes/image: skip recipe on invalid IMAGE_FEATURES item If you add an item to EXTRA_IMAGE_FEATURES in your local.conf that is not supported by image.bbclass itself (such as "tools-sdk" which is implemented in core-image.bbclass), it can be somewhat annoying to have the parse fall over if you have a recipe that inherits image.bbclass only. Change the error from bb.fatal to skip the recipe instead so that you only see the error when attempting to build the recipe, plus add a bit of logic to report if the feature is coming in via EXTRA_IMAGE_FEATURES. Fixes [YOCTO #5023]. Signed-off-by: Paul Eggleton --- meta/classes/image.bbclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'meta/classes/image.bbclass') diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index a8f3ceea7f..d4c98db9ea 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -52,7 +52,10 @@ def check_image_features(d): features = set(oe.data.typed_value('IMAGE_FEATURES', d)) for feature in features: if feature not in valid_features: - bb.fatal("'%s' in IMAGE_FEATURES is not a valid image feature. Valid features: %s" % (feature, ' '.join(valid_features))) + if bb.utils.contains('EXTRA_IMAGE_FEATURES', feature, True, False, d): + raise bb.parse.SkipRecipe("'%s' in IMAGE_FEATURES (added via EXTRA_IMAGE_FEATURES) is not a valid image feature. Valid features: %s" % (feature, ' '.join(valid_features))) + else: + raise bb.parse.SkipRecipe("'%s' in IMAGE_FEATURES is not a valid image feature. Valid features: %s" % (feature, ' '.join(valid_features))) IMAGE_INSTALL ?= "" IMAGE_INSTALL[type] = "list" -- cgit v1.2.3