From 94f61c2682e5cfd819ac84535650c3e0a654415a Mon Sep 17 00:00:00 2001 From: "Alexander D. Kanevskiy" Date: Thu, 21 Apr 2016 12:47:27 +0300 Subject: image.bbclass: don't execute compression commands multiple times 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 Signed-off-by: Ross Burton --- meta/classes/image.bbclass | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'meta') diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 9ba60117f6..4542e95d1e 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -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}")) -- cgit 1.2.3-korg