[OE-core] [PATCH 5/6] wic: add WKS_FILE_DEPENDS variable
Ed Bartosh
ed.bartosh at linux.intel.com
Tue Feb 21 15:23:10 UTC 2017
This variable should be used to specify dependencies that
will be added to DEPENDS only if wic image build is 'active'
i.e. when 'wic' is in IMAGE_FSTYPES.
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
---
meta-selftest/recipes-test/images/wic-image-minimal.bb | 2 +-
meta/classes/image_types_wic.bbclass | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/meta-selftest/recipes-test/images/wic-image-minimal.bb b/meta-selftest/recipes-test/images/wic-image-minimal.bb
index 9e93b8e..b687935 100644
--- a/meta-selftest/recipes-test/images/wic-image-minimal.bb
+++ b/meta-selftest/recipes-test/images/wic-image-minimal.bb
@@ -6,7 +6,7 @@ IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP}"
IMAGE_FSTYPES = "wic"
-DEPENDS = "syslinux syslinux-native dosfstools-native mtools-native gptfdisk-native"
+WKS_FILE_DEPENDS = "syslinux syslinux-native dosfstools-native mtools-native gptfdisk-native"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
diff --git a/meta/classes/image_types_wic.bbclass b/meta/classes/image_types_wic.bbclass
index ec6c14d..43b2917 100644
--- a/meta/classes/image_types_wic.bbclass
+++ b/meta/classes/image_types_wic.bbclass
@@ -40,6 +40,8 @@ USING_WIC = "${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic ' + ' '.join('wic.%s
WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' % os.path.exists('${WKS_FULL_PATH}') if '${USING_WIC}' else ''}"
do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}"
do_image_wic[depends] += "wic-tools:do_build"
+WKS_FILE_DEPENDS ??= ''
+DEPENDS += "${@ '${WKS_FILE_DEPENDS}' if d.getVar('USING_WIC') else '' }"
python do_write_wks_template () {
"""Write out expanded template contents to WKS_FULL_PATH."""
--
2.1.4
More information about the Openembedded-core
mailing list