summaryrefslogtreecommitdiff
path: root/meta/classes/image.bbclass
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:40 +0000
commitcbe9d2f748125aa2dffc829570d46f8dbc1781a4 (patch)
tree44aecb846deb27a1c577e1aa8c5549bfb4b55a8e /meta/classes/image.bbclass
parentcb217f442b8143d88112bebe4011051efbd905a3 (diff)
downloadopenembedded-core-cbe9d2f748125aa2dffc829570d46f8dbc1781a4.tar.gz
openembedded-core-cbe9d2f748125aa2dffc829570d46f8dbc1781a4.tar.bz2
openembedded-core-cbe9d2f748125aa2dffc829570d46f8dbc1781a4.zip
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 <paul.eggleton@linux.intel.com>
Diffstat (limited to 'meta/classes/image.bbclass')
-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):
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"