]> code.ossystems Code Review - openembedded-core.git/commitdiff
image.bbclass: don't execute compression commands multiple times
authorAlexander D. Kanevskiy <kad@kad.name>
Thu, 21 Apr 2016 09:47:27 +0000 (12:47 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 29 Apr 2016 06:53:57 +0000 (07:53 +0100)
In case of chained conversion methods are used via COMPRESS_CMD_*
there is chance that some of steps would be executed multiple times.

[YOCTO #9482]

Signed-off-by: Alexander D. Kanevskiy <kad@kad.name>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/image.bbclass

index 9ba60117f6deda9e94b2a86d274dbe5416746bb2..4542e95d1e51e7854eee7466ce38feceba8e1fc2 100644 (file)
@@ -402,9 +402,13 @@ python () {
                     # Create input image first.
                     gen_conversion_cmds(type)
                     localdata.setVar('type', type)
-                    cmds.append("\t" + localdata.getVar("COMPRESS_CMD_" + ctype, True))
+                    cmd = "\t" + localdata.getVar("COMPRESS_CMD_" + ctype, True)
+                    if cmd not in cmds:
+                        cmds.append(cmd)
                     vardeps.add('COMPRESS_CMD_' + ctype)
-                    subimages.append(type + "." + ctype)
+                    subimage = type + "." + ctype
+                    if subimage not in subimages:
+                        subimages.append(subimage)
                     if type not in alltypes:
                         rm_tmp_images.add(localdata.expand("${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"))