image.bbclass: run wicenv task only for wic images
PATCH 1/1 image.bbclass: run wicenv task only for wic images
Currently do_wicenv task is run for all images. However, its result is used only to produce wic image. It's better to run this task only for wic images. If another rootfs is required to produce wic image, dependency to its do_wicenv must be added to the wic image recipy.
Stopped running do_wicenv for all images. Added explicit dependency to this task in wic-image-minimal recipe.
[YOCTO #9095]
--- meta-selftest/recipes-test/images/wic-image-minimal.bb | 2 +- meta/classes/image.bbclass | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
meta-selftest/recipes-test/images/wic-image-minimal.bb +1 -1
@@ -11,7 +11,7 @@ DEPENDS = "syslinux syslinux-native parted-native dosfstools-native mtools-nativ # core-image-minimal is referenced in .wks, so we need its rootfs # to be ready before our rootfs -do_rootfs[depends] += "core-image-minimal:do_rootfs_wicenv" +do_rootfs[depends] += "core-image-minimal:do_rootfs core-image-minimal:do_rootfs_wicenv" IMAGE_ROOTFS_EXTRA_SPACE = "2000"
meta/classes/image.bbclass +1 -1
@@ -275,7 +275,7 @@ python do_rootfs_wicenv () { if value: envf.write('%s="%s"\n' % (var, value.strip())) } -addtask do_rootfs_wicenv after do_image before do_image_wic do_image_complete +addtask do_rootfs_wicenv after do_rootfs before do_image_wic do_rootfs_wicenv[vardeps] += "${WICVARS}" do_rootfs_wicenv[prefuncs] = 'set_image_size'
Signature · 1 line
2.1.4
Quoted 42 lines · Ed Bartosh
Currently
do_wicenvtask is run for all images. However, its result is used only to produce wic image. It's better to run this task only for wic images. If another rootfs is required to produce wic image, dependency to itsdo_wicenvmust be added to the wic image recipy.Stopped running
do_wicenvfor all images. Added explicit dependency to this task in wic-image-minimal recipe.[YOCTO #9095]
Signed-off-by Ed Bartosh <[email protected]>--- meta-selftest/recipes-test/images/wic-image-minimal.bb | 2 +- meta/classes/image.bbclass | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)meta-selftest/recipes-test/images/wic-image-minimal.bb +0
-0@@ -11,7 +11,7 @@ DEPENDS = "syslinux syslinux-native parted-nativedosfstools-native mtools-nativ
# core-image-minimal is referenced in .wks, so we need its rootfs # to be ready before our rootfsmeta-selftest/recipes-test/images/wic-image-minimal.bb +1
-2-do_rootfs[depends] += "core-image-minimal:do_rootfs_wicenv" +do_rootfs[depends] += "core-image-minimal:do_rootfs core-image -minimal:do_rootfs_wicenv" IMAGE_ROOTFS_EXTRA_SPACE = "2000"meta/classes/image.bbclass +0
-1@@ -275,7 +275,7 @@ python do_rootfs_wicenv () { if value: envf.write('%s="%s"\n' % (var, value.strip())) } -addtask do_rootfs_wicenv after do_image before do_image_wic
Quoted 5 lines
do_image_complete
+addtaskdo_rootfs_wicenvafterdo_rootfsbeforedo_image_wic
do_rootfs_wicenv[vardeps] += "${WICVARS}" do_rootfs_wicenv[prefuncs] = 'set_image_size'
I think I tried do_rootfs here originally and there was a race of some sort so this needs to be do_image. You can check the commit logs for the exact reason (prelink can cause the image size to change during do_image and we need the image size?).
Cheers,
Richard
PATCH v2 1/1 image.bbclass: run wicenv task only for wic images
Currently do_wicenv task is run for all images. However, its result is used only to produce wic image. It's better to run this task only for wic images. If another rootfs is required to produce wic image, dependency to its do_wicenv must be added to the wic image recipy.
Stopped running do_wicenv for all images. Added explicit dependency to this task in wic-image-minimal recipe.
[YOCTO #9095]
--- meta-selftest/recipes-test/images/wic-image-minimal.bb | 2 +- meta/classes/image.bbclass | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
meta-selftest/recipes-test/images/wic-image-minimal.bb +1 -1
@@ -11,7 +11,7 @@ DEPENDS = "syslinux syslinux-native parted-native dosfstools-native mtools-nativ # core-image-minimal is referenced in .wks, so we need its rootfs # to be ready before our rootfs -do_rootfs[depends] += "core-image-minimal:do_rootfs_wicenv" +do_rootfs[depends] += "core-image-minimal:do_image core-image-minimal:do_rootfs_wicenv" IMAGE_ROOTFS_EXTRA_SPACE = "2000"
meta/classes/image.bbclass +1 -1
@@ -275,7 +275,7 @@ python do_rootfs_wicenv () { if value: envf.write('%s="%s"\n' % (var, value.strip())) } -addtask do_rootfs_wicenv after do_image before do_image_wic do_image_complete +addtask do_rootfs_wicenv after do_image before do_image_wic do_rootfs_wicenv[vardeps] += "${WICVARS}" do_rootfs_wicenv[prefuncs] = 'set_image_size'
Signature · 1 line
2.1.4
Quoted 9 lines · Ed Bartosh
Currently
do_wicenvtask is run for all images. However, its result is used only to produce wic image. It's better to run this task only for wic images. If another rootfs is required to produce wic image, dependency to itsdo_wicenvmust be added to the wic image recipy.Stopped running
do_wicenvfor all images. Added explicit dependency to this task in wic-image-minimal recipe.
Quoted 7 lines
[YOCTO #9095]
Signed-off-by Ed Bartosh <[email protected]>--- meta-selftest/recipes-test/images/wic-image-minimal.bb | 2 +- meta/classes/image.bbclass | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
This broke one of the selftests, I fixed it with this:
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=92b2bc5d2755160e007b651d984038693fe43bbb
Cheers,
Richard