summaryrefslogtreecommitdiffstats
path: root/meta/classes/image_types.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-02 12:08:02 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-02 16:22:48 +0000
commit1f033532a920217cc52b1af2f36116795d65fff8 (patch)
tree0d0511e0fc4d137c4c57a1fea815751376da57a2 /meta/classes/image_types.bbclass
parent93b3692ac810f7129f6561b446847800aecaf352 (diff)
downloadpoky-1f033532a920217cc52b1af2f36116795d65fff8.tar.gz
image_types.bbclass: We need to preserve order in the types variable and avoid set()
(From OE-Core rev: c547169f7dfe043affc2ddc5ae0a9091379df6de) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/image_types.bbclass')
-rw-r--r--meta/classes/image_types.bbclass12
1 files changed, 8 insertions, 4 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index b2503ead84..681571d483 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -3,20 +3,24 @@ def get_imagecmds(d):
3 old_overrides = d.getVar('OVERRIDES', 0) 3 old_overrides = d.getVar('OVERRIDES', 0)
4 4
5 alltypes = d.getVar('IMAGE_FSTYPES', True).split() 5 alltypes = d.getVar('IMAGE_FSTYPES', True).split()
6 types = d.getVar('IMAGE_FSTYPES', True).split() 6 types = []
7 ctypes = d.getVar('COMPRESSIONTYPES', True).split() 7 ctypes = d.getVar('COMPRESSIONTYPES', True).split()
8 cimages = {} 8 cimages = {}
9 9
10 # Filter out all the compressed images from types 10 # Filter out all the compressed images from types
11 for type in types: 11 for type in alltypes:
12 basetype = None
12 for ctype in ctypes: 13 for ctype in ctypes:
13 if type.endswith("." + ctype): 14 if type.endswith("." + ctype):
14 basetype = type[:-len("." + ctype)] 15 basetype = type[:-len("." + ctype)]
15 types[types.index(type)] = basetype 16 if basetype not in types:
17 types.append(basetype)
16 if basetype not in cimages: 18 if basetype not in cimages:
17 cimages[basetype] = [] 19 cimages[basetype] = []
18 cimages[basetype].append(ctype) 20 cimages[basetype].append(ctype)
19 break 21 break
22 if not basetype and type not in types:
23 types.append(type)
20 24
21 # Live and VMDK images will be processed via inheriting 25 # Live and VMDK images will be processed via inheriting
22 # bbclass and does not get processed here. 26 # bbclass and does not get processed here.
@@ -33,7 +37,7 @@ def get_imagecmds(d):
33 if d.getVar('IMAGE_LINK_NAME', True): 37 if d.getVar('IMAGE_LINK_NAME', True):
34 cmds += " rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.*" 38 cmds += " rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.*"
35 39
36 for type in set(types): 40 for type in types:
37 ccmd = [] 41 ccmd = []
38 subimages = [] 42 subimages = []
39 localdata = bb.data.createCopy(d) 43 localdata = bb.data.createCopy(d)