* [PATCH] image_types.bbclass: We need to preserve order in the types variable and avoid set()
@ 2012-03-02 12:12 Richard Purdie
0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2012-03-02 12:12 UTC (permalink / raw)
To: openembedded-core
If we don't do this, the order can be changed and the variable is
sensitive to the ordering.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index f756c39..5da2961 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -3,20 +3,24 @@ def get_imagecmds(d):
old_overrides = d.getVar('OVERRIDES', 0)
alltypes = d.getVar('IMAGE_FSTYPES', True).split()
- types = d.getVar('IMAGE_FSTYPES', True).split()
+ types = []
ctypes = d.getVar('COMPRESSIONTYPES', True).split()
cimages = {}
# Filter out all the compressed images from types
- for type in types:
+ for type in alltypes:
+ basetype = None
for ctype in ctypes:
if type.endswith("." + ctype):
basetype = type[:-len("." + ctype)]
- types[types.index(type)] = basetype
+ if basetype not in types:
+ types.append(basetype)
if basetype not in cimages:
cimages[basetype] = []
cimages[basetype].append(ctype)
break
+ if not basetype and type not in types:
+ types.append(type)
# Live and VMDK images will be processed via inheriting
# bbclass and does not get processed here.
@@ -33,7 +37,7 @@ def get_imagecmds(d):
if d.getVar('IMAGE_LINK_NAME', True):
cmds += " rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.*"
- for type in set(types):
+ for type in types:
ccmd = []
subimages = []
localdata = bb.data.createCopy(d)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-03-02 12:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-02 12:12 [PATCH] image_types.bbclass: We need to preserve order in the types variable and avoid set() Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox