diff options
author | Ross Burton <ross.burton@intel.com> | 2016-05-03 17:28:01 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-11 10:33:40 +0100 |
commit | 9b9b9832d6a294a55edc35c432ed1508a47a653c (patch) | |
tree | 8100c6cfdc2dee7a0f9c5345f95a38ac7f0d80ec | |
parent | cf1788218e4b99d21d3c0484abcf1e6699bda011 (diff) | |
download | poky-9b9b9832d6a294a55edc35c432ed1508a47a653c.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)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/image_types.bbclass | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index 0b9758e42b..f74ae18c69 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass | |||
@@ -11,32 +11,28 @@ IMAGE_ROOTFS_ALIGNMENT ?= "1" | |||
11 | 11 | ||
12 | def imagetypes_getdepends(d): | 12 | def 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 | ||
41 | XZ_COMPRESSION_LEVEL ?= "-e -6" | 37 | XZ_COMPRESSION_LEVEL ?= "-e -6" |
42 | XZ_INTEGRITY_CHECK ?= "crc32" | 38 | XZ_INTEGRITY_CHECK ?= "crc32" |