mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 18:49:32 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
abae515395
commit
d38658b784
@@ -11,32 +11,28 @@ IMAGE_ROOTFS_ALIGNMENT ?= "1"
|
|||||||
|
|
||||||
def imagetypes_getdepends(d):
|
def imagetypes_getdepends(d):
|
||||||
def adddep(depstr, deps):
|
def adddep(depstr, deps):
|
||||||
for i in (depstr or "").split():
|
for d in (depstr or "").split():
|
||||||
if i not in deps:
|
# Add task dependency if not already present
|
||||||
deps.append(i)
|
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', True) or "").split())
|
||||||
fstypes |= set((d.getVar('IMAGE_FSTYPES_DEBUGFS', 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"]:
|
deps = set()
|
||||||
type = "ext4"
|
for typestring in fstypes:
|
||||||
basetype = type
|
types = typestring.split(".")
|
||||||
for ctype in ctypes:
|
basetype, resttypes = types[0], types[1:]
|
||||||
if type.endswith("." + ctype):
|
|
||||||
basetype = type[:-len("." + ctype)]
|
adddep(d.getVar('IMAGE_DEPENDS_%s' % basetype, True) , deps)
|
||||||
adddep(d.getVar("COMPRESS_DEPENDS_%s" % ctype, True), deps)
|
|
||||||
break
|
|
||||||
for typedepends in (d.getVar("IMAGE_TYPEDEP_%s" % basetype, True) or "").split():
|
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' % typedepends, True) , deps)
|
||||||
adddep(d.getVar('IMAGE_DEPENDS_%s' % basetype, True) , deps)
|
for ctype in resttypes:
|
||||||
|
adddep(d.getVar("COMPRESS_DEPENDS_%s" % ctype, True), deps)
|
||||||
depstr = ""
|
|
||||||
for dep in deps:
|
|
||||||
depstr += " " + dep + ":do_populate_sysroot"
|
|
||||||
return depstr
|
|
||||||
|
|
||||||
|
# Sort the set so that ordering is consistant
|
||||||
|
return " ".join(sorted(deps))
|
||||||
|
|
||||||
XZ_COMPRESSION_LEVEL ?= "-e -6"
|
XZ_COMPRESSION_LEVEL ?= "-e -6"
|
||||||
XZ_INTEGRITY_CHECK ?= "crc32"
|
XZ_INTEGRITY_CHECK ?= "crc32"
|
||||||
|
|||||||
Reference in New Issue
Block a user