[OE-core] [PATCH] image.bbclass: exclude deploy-${PN}-image-complete from rm_work

Ming Liu liu.ming50 at gmail.com
Sun Aug 4 14:04:13 UTC 2019


Hi, Richard:

This is to handle the case IMAGE_CMD_yyy depending on IMAGE_CMD_xxx, while
IMAGE_CMD_yyy need access the result generated by IMAGE_CMD_xxx in
${IMGDEPLOYDIR}, and IMAGE_CMD_yyy itself wanna generate a result in
${IMGDEPLOYDIR} as well, to be able to be covered by sstate.

In this case, IMAGE_CMD_yyy should not get the IMAGE_CMD_xxx's result from
${DEPLOY_DIR_IMAGE} because that might not be generated by the latest
bitbake run.

And the result of IMAGE_CMD_xxx might not exit in ${IMGDEPLOYDIR} when
rm_work is chosen in the following scenario:

1 bitbake image (IMAGE_CMD_xxx and IMAGE_CMD_yyy both run at the first time)
2 Change some code in IMAGE_CMD_yyy, but do not touch IMAGE_CMD_xxx
3 bitbake image

in the step 3, the result generated by IMAGE_CMD_xxx would not be in
${IMGDEPLOYDIR} if rm_work is chosen (Because it's removed in step 1), so
this patch mainly aims to fix this problem.

//Ming Liu



On Fri, 2019-08-02 at 17:12 +0800, liu.ming50 at gmail.com wrote:
> > From: Ming Liu <ming.liu at toradex.com>
> >
> > The results in ${IMGDEPLOYDIR} generated by a image task could be
> > used by later image tasks.
>
> No they shouldn't.
>
> > , hence they should be excluded by rm_work. Or else when a image task
> > gets rerun but one of its dependent image task does not, then the
> > results generated by this dependent image task would not be there in
> > ${IMGDEPLOYDIR}.
>
> Nothing should be poking into IMGDEPLOYDIR outside of the image tasks.
>
> do_image_complete[sstate-inputdirs] = "${IMGDEPLOYDIR}"
> do_image_complete[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}"
>
> anything else should be after do_image_complete and be referencing
> DEPLOY_DIR_IMAGE.
>
> Cheers,
>
> Richard
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20190804/46f87d3f/attachment.html>


More information about the Openembedded-core mailing list