summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-05-03 17:28:01 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-29 19:35:58 +0100
commitd38658b7842056071eccd1365a192c875f6b7a2c (patch)
tree1a4c33729dc730e1f94416e6d0e3fb9f9a68422d /meta
parentabae515395a37673eca6120871d5166ae4416d40 (diff)
downloadpoky-d38658b7842056071eccd1365a192c875f6b7a2c.tar.gz
image_types: fix image/compression dependency collection
As compressions can be chained (i.e. cpio.bz2.md5sum) we need to walk the fstype list to collect the dependencies from each step. (From OE-Core rev: 05c59ed987cdddc00e9e217032a69197e40a8448) (From OE-Core rev: b1869e336b937f9c0f41eac781f2a75897e93d30) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/image_types.bbclass36
1 files changed, 16 insertions, 20 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 53af7ca8dc..538683ee32 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -11,32 +11,28 @@ IMAGE_ROOTFS_ALIGNMENT ?= "1"
11 11
12def imagetypes_getdepends(d): 12def imagetypes_getdepends(d):
13 def adddep(depstr, deps): 13 def adddep(depstr, deps):
14 for i in (depstr or "").split(): 14 for d in (depstr or "").split():
15 if i not in deps: 15 # Add task dependency if not already present
16 deps.append(i) 16 if ":" not in d:
17 d += ":do_populate_sysroot"
18 deps.add(d)
17 19
18 deps = []
19 ctypes = d.getVar('COMPRESSIONTYPES', True).split()
20 fstypes = set((d.getVar('IMAGE_FSTYPES', True) or "").split()) 20 fstypes = set((d.getVar('IMAGE_FSTYPES', True) or "").split())
21 fstypes |= set((d.getVar('IMAGE_FSTYPES_DEBUGFS', True) or "").split()) 21 fstypes |= set((d.getVar('IMAGE_FSTYPES_DEBUGFS', True) or "").split())
22 for type in fstypes: 22
23 if type in ["vmdk", "vdi", "qcow2", "hdddirect", "live", "iso", "hddimg"]: 23 deps = set()
24 type = "ext4" 24 for typestring in fstypes:
25 basetype = type 25 types = typestring.split(".")
26 for ctype in ctypes: 26 basetype, resttypes = types[0], types[1:]
27 if type.endswith("." + ctype): 27
28 basetype = type[:-len("." + ctype)] 28 adddep(d.getVar('IMAGE_DEPENDS_%s' % basetype, True) , deps)
29 adddep(d.getVar("COMPRESS_DEPENDS_%s" % ctype, True), deps)
30 break
31 for typedepends in (d.getVar("IMAGE_TYPEDEP_%s" % basetype, True) or "").split(): 29 for typedepends in (d.getVar("IMAGE_TYPEDEP_%s" % basetype, True) or "").split():
32 adddep(d.getVar('IMAGE_DEPENDS_%s' % typedepends, True) , deps) 30 adddep(d.getVar('IMAGE_DEPENDS_%s' % typedepends, True) , deps)
33 adddep(d.getVar('IMAGE_DEPENDS_%s' % basetype, True) , deps) 31 for ctype in resttypes:
34 32 adddep(d.getVar("COMPRESS_DEPENDS_%s" % ctype, True), deps)
35 depstr = ""
36 for dep in deps:
37 depstr += " " + dep + ":do_populate_sysroot"
38 return depstr
39 33
34 # Sort the set so that ordering is consistant
35 return " ".join(sorted(deps))
40 36
41XZ_COMPRESSION_LEVEL ?= "-e -6" 37XZ_COMPRESSION_LEVEL ?= "-e -6"
42XZ_INTEGRITY_CHECK ?= "crc32" 38XZ_INTEGRITY_CHECK ?= "crc32"