When new conversion type is defined, BitBake assumes
that CONVERSION_CMD: is defined for the type, so it gets
the variable which returns NoneType if it is not defined.
That generates the following exception which may not be clear
for some:
--
ERROR: /../techleef-image.bb: Error executing a python function in <code>:
The stack trace of python calls that resulted in this exception/failure was:
File: '<code>', lineno: 16, function: <module>
0012:__anon_117__.._recipe_populate_sdk_base_bbclass(d)
0013:__anon_427__.._recipe_populate_sdk_base_bbclass(d)
0014:__anon_131__.._recipe_image_bbclass(d)
0015:__anon_187__.._recipe_image_bbclass(d)
*** 0016:__anon_535__.._recipe_image_bbclass(d)
0017:__anon_44__.._recipe_rootfs_ipk_bbclass(d)
0018:__anon_191__.._recipe_siteinfo_bbclass(d)
0019:__anon_17__.._recipe_license_image_bbclass(d)
0020:__anon_206__.._recipe_image_types_wic_bbclass(d)
File: '/../image.bbclass', lineno: 501, function: __anon_535__.._recipe_image_bbclass
0497: if original_type not in alltypes:
0498: rm_tmp_images.add(localdata.expand("${IMAGE_NAME}.${type}"))
0499:
0500: for bt in basetypes[t]:
*** 0501: gen_conversion_cmds(bt)
0502:
0503: localdata.setVar('type', realt)
0504: if t not in alltypes:
0505: rm_tmp_images.add(localdata.expand("${IMAGE_NAME}.${type}"))
File: '/../image.bbclass', lineno: 490, function: gen_conversion_cmds
0486: type = type[8:]
0487: # Create input image first.
0488: gen_conversion_cmds(type)
0489: localdata.setVar('type', type)
*** 0490: cmd = "\t" + localdata.getVar("CONVERSION_CMD:" + ctype)
0491: if cmd not in cmds:
0492: cmds.append(cmd)
0493: vardeps.add('CONVERSION_CMD:' + ctype)
0494: subimage = type + "." + ctype
Exception: TypeError: can only concatenate str (not "NoneType") to str
ERROR: Parsing halted due to errors, see error messages above
--
Fail with human readable error if no CONVERSION_CMD is defined for
any defined subtype.
Signed-off-by: Talel BELHAJ SALEM <bhstalel@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
deprecated.add(var)
for ctype in resttypes:
+ ctype_cmd = d.getVar('CONVERSION_CMD:' + ctype)
+ if not ctype_cmd:
+ bb.fatal('No CONVERSION_CMD defined for subtype "%s"'
+ ' - possibly invalid conversion type name or missing support class' % ctype)
adddep(d.getVar("CONVERSION_DEPENDS_%s" % ctype), deps)
adddep(d.getVar("COMPRESS_DEPENDS_%s" % ctype), deps)