diff options
author | Ross Burton <ross.burton@intel.com> | 2016-05-03 17:28:01 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-29 19:34:41 +0100 |
commit | b1869e336b937f9c0f41eac781f2a75897e93d30 (patch) | |
tree | 37f1daf349a21455d2ae3d1000b2e08adf2bcd14 | |
parent | 4d3dad3329c8a9c9bb5254bb329031e9d2dafd7b (diff) | |
download | openembedded-core-b1869e336b937f9c0f41eac781f2a75897e93d30.tar.gz openembedded-core-b1869e336b937f9c0f41eac781f2a75897e93d30.tar.bz2 openembedded-core-b1869e336b937f9c0f41eac781f2a75897e93d30.zip |
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>
Signed-off-by: Armin Kuster <akuster@mvista.com>
-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 53af7ca8dc..538683ee32 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass @@ -11,32 +11,28 @@ IMAGE_ROOTFS_ALIGNMENT ?= "1" def imagetypes_getdepends(d): def adddep(depstr, deps): - for i in (depstr or "").split(): - if i not in deps: - deps.append(i) + for d in (depstr or "").split(): + # Add task dependency if not already present + if ":" not in d: + d += ":do_populate_sysroot" + deps.add(d) - deps = [] - ctypes = d.getVar('COMPRESSIONTYPES', True).split() fstypes = set((d.getVar('IMAGE_FSTYPES', True) or "").split()) fstypes |= set((d.getVar('IMAGE_FSTYPES_DEBUGFS', True) or "").split()) - for type in fstypes: - if type in ["vmdk", "vdi", "qcow2", "hdddirect", "live", "iso", "hddimg"]: - type = "ext4" - basetype = type - for ctype in ctypes: - if type.endswith("." + ctype): - basetype = type[:-len("." + ctype)] - adddep(d.getVar("COMPRESS_DEPENDS_%s" % ctype, True), deps) - break + + deps = set() + for typestring in fstypes: + types = typestring.split(".") + basetype, resttypes = types[0], types[1:] + + adddep(d.getVar('IMAGE_DEPENDS_%s' % basetype, True) , deps) for typedepends in (d.getVar("IMAGE_TYPEDEP_%s" % basetype, True) or "").split(): adddep(d.getVar('IMAGE_DEPENDS_%s' % typedepends, True) , deps) - adddep(d.getVar('IMAGE_DEPENDS_%s' % basetype, True) , deps) - - depstr = "" - for dep in deps: - depstr += " " + dep + ":do_populate_sysroot" - return depstr + for ctype in resttypes: + adddep(d.getVar("COMPRESS_DEPENDS_%s" % ctype, True), deps) + # Sort the set so that ordering is consistant + return " ".join(sorted(deps)) XZ_COMPRESSION_LEVEL ?= "-e -6" XZ_INTEGRITY_CHECK ?= "crc32" |