summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-01-26 15:32:23 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-03 14:53:50 +0000
commit69c588b66d5d44ed97e21826ff2501c76e5b4ea8 (patch)
tree88911b5091b6d5f884f4cff5184c04babf1c2ca3 /meta/classes
parent124f0419b9d43c13ac46ea6ccaf17b15c499ea8f (diff)
downloadpoky-69c588b66d5d44ed97e21826ff2501c76e5b4ea8.tar.gz
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]. (From OE-Core rev: cbe9d2f748125aa2dffc829570d46f8dbc1781a4) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/image.bbclass5
1 files changed, 4 insertions, 1 deletions
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):
52 features = set(oe.data.typed_value('IMAGE_FEATURES', d)) 52 features = set(oe.data.typed_value('IMAGE_FEATURES', d))
53 for feature in features: 53 for feature in features:
54 if feature not in valid_features: 54 if feature not in valid_features:
55 bb.fatal("'%s' in IMAGE_FEATURES is not a valid image feature. Valid features: %s" % (feature, ' '.join(valid_features))) 55 if bb.utils.contains('EXTRA_IMAGE_FEATURES', feature, True, False, d):
56 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)))
57 else:
58 raise bb.parse.SkipRecipe("'%s' in IMAGE_FEATURES is not a valid image feature. Valid features: %s" % (feature, ' '.join(valid_features)))
56 59
57IMAGE_INSTALL ?= "" 60IMAGE_INSTALL ?= ""
58IMAGE_INSTALL[type] = "list" 61IMAGE_INSTALL[type] = "list"