[OE-core] [PATCH 5/5] lib/oe/image.py: add error checking for missing IMAGE_CMD
Paul Eggleton
paul.eggleton at linux.intel.com
Wed Jan 28 11:54:44 UTC 2015
An invalid value in IMAGE_FSTYPES was triggering a traceback. Add a
check and a reasonable error message instead.
Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
---
meta/lib/oe/image.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oe/image.py b/meta/lib/oe/image.py
index f9c8f84..0ce303d 100644
--- a/meta/lib/oe/image.py
+++ b/meta/lib/oe/image.py
@@ -296,7 +296,11 @@ class Image(ImageDepGraph):
bb.data.update_data(localdata)
localdata.setVar('type', type)
- cmds.append("\t" + localdata.getVar("IMAGE_CMD", True))
+ image_cmd = localdata.getVar("IMAGE_CMD", True)
+ if image_cmd:
+ cmds.append("\t" + image_cmd)
+ else:
+ bb.fatal("No IMAGE_CMD defined for IMAGE_FSTYPES entry '%s' - possibly invalid type name or missing support class" % type)
cmds.append(localdata.expand("\tcd ${DEPLOY_DIR_IMAGE}"))
if type in cimages:
--
1.9.3
More information about the Openembedded-core
mailing list