summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-06-16 18:21:26 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-28 20:55:08 +0100
commitf93d58378fb4095a18c1403de03ca0e13ce465cd (patch)
treeffe83a7bbda720b2adabeacc85be3564d6a7bcd7 /meta/classes
parentcb5116b65066d374ef6ff81b3017a65954c0e7aa (diff)
downloadpoky-f93d58378fb4095a18c1403de03ca0e13ce465cd.tar.gz
image_types.bbclass: get rid of IMAGE_DEPENDS
The IMAGE_DEPENDS_<type> variables can be set to add dependencies for individual image types. Those dependencies are added to the do_rootfs task, while they really should be added to the specific image type tasks. These variables are not documented anywhere. Replaced usage of IMAGE_DEPENDS_<type> with explicitly added dependencies to do_image_<type> tasks. [YOCTO #11302] (From OE-Core rev: c5f33d466122e53be910fa448af60ef3937eb828) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/image_types.bbclass45
1 files changed, 27 insertions, 18 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index f8692dc2ad..a5f7e19dfe 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -26,20 +26,31 @@ def imagetypes_getdepends(d):
26 fstypes = set((d.getVar('IMAGE_FSTYPES') or "").split()) 26 fstypes = set((d.getVar('IMAGE_FSTYPES') or "").split())
27 fstypes |= set((d.getVar('IMAGE_FSTYPES_DEBUGFS') or "").split()) 27 fstypes |= set((d.getVar('IMAGE_FSTYPES_DEBUGFS') or "").split())
28 28
29 deprecated = set()
29 deps = set() 30 deps = set()
30 for typestring in fstypes: 31 for typestring in fstypes:
31 basetype, resttypes = split_types(typestring) 32 basetype, resttypes = split_types(typestring)
32 adddep(d.getVar('IMAGE_DEPENDS_%s' % basetype) , deps) 33
34 var = "IMAGE_DEPENDS_%s" % basetype
35 if d.getVar(var) is not None:
36 deprecated.add(var)
33 37
34 for typedepends in (d.getVar("IMAGE_TYPEDEP_%s" % basetype) or "").split(): 38 for typedepends in (d.getVar("IMAGE_TYPEDEP_%s" % basetype) or "").split():
35 base, rest = split_types(typedepends) 39 base, rest = split_types(typedepends)
36 adddep(d.getVar('IMAGE_DEPENDS_%s' % base) , deps)
37 resttypes += rest 40 resttypes += rest
38 41
42 var = "IMAGE_DEPENDS_%s" % base
43 if d.getVar(var) is not None:
44 deprecated.add(var)
45
39 for ctype in resttypes: 46 for ctype in resttypes:
40 adddep(d.getVar("CONVERSION_DEPENDS_%s" % ctype), deps) 47 adddep(d.getVar("CONVERSION_DEPENDS_%s" % ctype), deps)
41 adddep(d.getVar("COMPRESS_DEPENDS_%s" % ctype), deps) 48 adddep(d.getVar("COMPRESS_DEPENDS_%s" % ctype), deps)
42 49
50 if deprecated:
51 bb.fatal('Deprecated variable(s) found: "%s". '
52 'Use do_image_<type>[depends] += "<recipe>:<task>" instead' % ', '.join(deprecated))
53
43 # Sort the set so that ordering is consistant 54 # Sort the set so that ordering is consistant
44 return " ".join(sorted(deps)) 55 return " ".join(sorted(deps))
45 56
@@ -101,7 +112,7 @@ IMAGE_CMD_squashfs-lzo = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAM
101# you need special parameters (like --xattrs) which are only supported 112# you need special parameters (like --xattrs) which are only supported
102# by GNU tar upstream >= 1.27, then override that default: 113# by GNU tar upstream >= 1.27, then override that default:
103# IMAGE_CMD_TAR = "tar --xattrs --xattrs-include=*" 114# IMAGE_CMD_TAR = "tar --xattrs --xattrs-include=*"
104# IMAGE_DEPENDS_tar_append = " tar-replacement-native" 115# do_image_tar[depends] += "tar-replacement-native:do_populate_sysroot"
105# EXTRANATIVEPATH += "tar-native" 116# EXTRANATIVEPATH += "tar-native"
106# 117#
107# The GNU documentation does not specify whether --xattrs-include is necessary. 118# The GNU documentation does not specify whether --xattrs-include is necessary.
@@ -215,21 +226,19 @@ EXTRA_IMAGECMD_ext4 ?= "-i 4096"
215EXTRA_IMAGECMD_btrfs ?= "-n 4096" 226EXTRA_IMAGECMD_btrfs ?= "-n 4096"
216EXTRA_IMAGECMD_elf ?= "" 227EXTRA_IMAGECMD_elf ?= ""
217 228
218IMAGE_DEPENDS = "" 229do_image_jffs2[depends] += "mtd-utils-native:do_populate_sysroot"
219IMAGE_DEPENDS_jffs2 = "mtd-utils-native" 230do_image_cramfs[depends] += "util-linux-native:do_populate_sysroot"
220IMAGE_DEPENDS_cramfs = "util-linux-native" 231do_image_ext2[depends] += "e2fsprogs-native:do_populate_sysroot"
221IMAGE_DEPENDS_ext2 = "e2fsprogs-native" 232do_image_ext3[depends] += "e2fsprogs-native:do_populate_sysroot"
222IMAGE_DEPENDS_ext3 = "e2fsprogs-native" 233do_image_ext4[depends] += "e2fsprogs-native:do_populate_sysroot"
223IMAGE_DEPENDS_ext4 = "e2fsprogs-native" 234do_image_btrfs[depends] += "btrfs-tools-native:do_populate_sysroot"
224IMAGE_DEPENDS_btrfs = "btrfs-tools-native" 235do_image_squashfs[depends] += "squashfs-tools-native:do_populate_sysroot"
225IMAGE_DEPENDS_squashfs = "squashfs-tools-native" 236do_image_squashfs-xz[depends] += "squashfs-tools-native:do_populate_sysroot"
226IMAGE_DEPENDS_squashfs-xz = "squashfs-tools-native" 237do_image_squashfs-lzo[depends] += "squashfs-tools-native:do_populate_sysroot"
227IMAGE_DEPENDS_squashfs-lzo = "squashfs-tools-native" 238do_image_elf[depends] += "virtual/kernel-native:do_populate_sysroot mkelfimage-native:do_populate_sysroot"
228IMAGE_DEPENDS_elf = "virtual/kernel mkelfimage-native" 239do_image_ubi[depends] += "mtd-utils-native:do_populate_sysroot"
229IMAGE_DEPENDS_ubi = "mtd-utils-native" 240do_image_ubifs[depends] += "mtd-utils-native:do_populate_sysroot"
230IMAGE_DEPENDS_ubifs = "mtd-utils-native" 241do_image_multiubi[depends] += "mtd-utils-native:do_populate_sysroot"
231IMAGE_DEPENDS_multiubi = "mtd-utils-native"
232IMAGE_DEPENDS_wic = "parted-native"
233 242
234# This variable is available to request which values are suitable for IMAGE_FSTYPES 243# This variable is available to request which values are suitable for IMAGE_FSTYPES
235IMAGE_TYPES = " \ 244IMAGE_TYPES = " \