]> code.ossystems Code Review - openembedded-core.git/commitdiff
image.bbclass: don't emit redundant IMAGE_CMD_xxx functions
authorAndre McCurdy <armccurdy@gmail.com>
Fri, 15 Apr 2016 03:47:46 +0000 (20:47 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 29 Apr 2016 06:53:57 +0000 (07:53 +0100)
IMAGE_CMD_xxx commands are always inlined within do_image_xxx.

When IMAGE_CMD_xxx is defined as a function (e.g. IMAGE_CMD_btrfs,
IMAGE_CMD_cpio, etc), a redundant copy of the function will be emitted
by default. Remove IMAGE_CMD_xxx 'func' flags to prevent that.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/image.bbclass

index 8bfd24193e23b2f7f0cbbd7e569c7cc42968e91d..9ba60117f6deda9e94b2a86d274dbe5416746bb2 100644 (file)
@@ -388,6 +388,10 @@ python () {
             bb.fatal("No IMAGE_CMD defined for IMAGE_FSTYPES entry '%s' - possibly invalid type name or missing support class" % t)
         cmds.append(localdata.expand("\tcd ${DEPLOY_DIR_IMAGE}"))
 
+        # Since a copy of IMAGE_CMD_xxx will be inlined within do_image_xxx,
+        # prevent a redundant copy of IMAGE_CMD_xxx being emitted as a function.
+        d.delVarFlag('IMAGE_CMD_' + realt, 'func')
+
         rm_tmp_images = set()
         def gen_conversion_cmds(bt):
             for ctype in ctypes: