Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] image.bbclass: chek circular dependency when IMAGE_FSTYPES append hddimg
@ 2016-01-26  9:37 Robert Yang
  2016-01-26  9:37 ` [PATCH 1/1] " Robert Yang
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Yang @ 2016-01-26  9:37 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit fc4209baa098caebf9c4cb75f9a6f2e85f43333c:

  Revert "xz: Allow to work with ASSUME_PROVIDED xz-native" (2016-01-25 10:08:25 +0000)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib rbt/img
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/img

Robert Yang (1):
  image.bbclass: chek circular dependency when IMAGE_FSTYPES append
    hddimg

 meta/classes/image-live.bbclass |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

-- 
1.7.9.5



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] image.bbclass: chek circular dependency when IMAGE_FSTYPES append hddimg
  2016-01-26  9:37 [PATCH 0/1] image.bbclass: chek circular dependency when IMAGE_FSTYPES append hddimg Robert Yang
@ 2016-01-26  9:37 ` Robert Yang
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Yang @ 2016-01-26  9:37 UTC (permalink / raw)
  To: openembedded-core

Fixed:
IMAGE_FSTYPES_append = " hddimg"

$ bitbake -g core-image-minimal-initramfs
NOTE: Resolving any missing task queue dependencies
NOTE: Preparing RunQueue
ERROR: Task /path/to/core-image-minimal-initramfs.bb (do_bootimg) has circular dependency on /path/to/core-image-minimal-initramfs.bb (do_image_complete)
ERROR: Command execution failed: Exited with 1

This is because IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}", and if
IMAGE_FSTYPES append hddimg, then core-image-minimal-initramfs.bb would
be circular dependency:
do_bootimg -> do_image_complete -> do_bootimg.

Now we check and error out.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/classes/image-live.bbclass |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/meta/classes/image-live.bbclass b/meta/classes/image-live.bbclass
index aafa7d5..d2314aa 100644
--- a/meta/classes/image-live.bbclass
+++ b/meta/classes/image-live.bbclass
@@ -9,7 +9,6 @@ LABELS_append = " ${SYSLINUX_LABELS} "
 
 ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.ext4"
 
-do_bootimg[depends] += "${INITRD_IMAGE}:do_image_complete"
 do_bootimg[depends] += "${PN}:do_image_ext4"
 
 inherit bootimg
@@ -18,3 +17,13 @@ IMAGE_TYPEDEP_live = "ext4"
 IMAGE_TYPEDEP_iso = "ext4"
 IMAGE_TYPEDEP_hddimg = "ext4"
 IMAGE_TYPES_MASKED += "live hddimg iso"
+
+python() {
+    image_b = d.getVar('IMAGE_BASENAME', True)
+    initrd_i = d.getVar('INITRD_IMAGE', True)
+    if image_b == initrd_i:
+        bb.error('INITRD_IMAGE %s cannot use image live, hddimg or iso.' % initrd_i)
+        bb.fatal('Check IMAGE_FSTYPES and INITRAMFS_FSTYPES settings.')
+    else:
+        d.appendVarFlag('do_bootimg', 'depends', ' %s:do_image_complete' % initrd_i)
+}
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-26  9:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-26  9:37 [PATCH 0/1] image.bbclass: chek circular dependency when IMAGE_FSTYPES append hddimg Robert Yang
2016-01-26  9:37 ` [PATCH 1/1] " Robert Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox