From: Paul Eggleton Date: Tue, 27 Jan 2015 10:02:38 +0000 (+0000) Subject: lib/oe/image.py: add error checking for missing IMAGE_CMD X-Git-Tag: 2015-4~576 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=f38c35b925d6eab0d5a41b8592b0eb8b0a3b7b72;p=openembedded-core.git lib/oe/image.py: add error checking for missing IMAGE_CMD An invalid value in IMAGE_FSTYPES was triggering a traceback. Add a check and a reasonable error message instead. Signed-off-by: Paul Eggleton --- diff --git a/meta/lib/oe/image.py b/meta/lib/oe/image.py index f9c8f84cf8..0ce303d570 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: