]> code.ossystems Code Review - openembedded-core.git/commitdiff
image_types.bbclass: add dependency do_image_wic -> do_bootimg
authorEd Bartosh <ed.bartosh@linux.intel.com>
Wed, 12 Oct 2016 11:47:16 +0000 (14:47 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 15 Oct 2016 08:55:30 +0000 (09:55 +0100)
To produce certain types of images wic uses do_bootimg results
to assemble final image. For example, it copies BOOT/EFI directory
produced by do_bootimg to boot partition for every EFI image.

The tricky part of this is that do_bootimg task is not always run,
so we can't always make do_image_wic depend on do_bootimg. We only
need to do it if do_bootimg present in task graph.

Thank to Cristopher Larson for this fix.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/image_types.bbclass

index 5ef6f60b89e33170f0585158f57a29a95acc7430..a7fffbce06f89b99e715a30bd5ce792a5c7a268f 100644 (file)
@@ -219,6 +219,11 @@ 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}"
 
+python () {
+    if d.getVar('USING_WIC', True) and 'do_bootimg' in d:
+        bb.build.addtask('do_image_wic', '', 'do_bootimg', d)
+}
+
 python do_write_wks_template () {
     """Write out expanded template contents to WKS_FULL_PATH."""
     import re