<div><div class=" NE-CH-HEIGHT" style="font-family:Arial;font-size:14px" dir="auto">Hi, Richard:</div><div class=" NE-CH-HEIGHT" style="font-family:Arial;font-size:14px" dir="auto"><br class=" NE-CH-HEIGHT" style="cursor: pointer;"></div><div class=" NE-CH-HEIGHT" style="font-family:Arial;font-size:14px" dir="auto">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.</div><div class=" NE-CH-HEIGHT" style="font-family:Arial;font-size:14px" dir="auto"><br class=" NE-CH-HEIGHT" style="cursor: pointer;"></div><div class=" NE-CH-HEIGHT" style="font-family:Arial;font-size:14px" dir="auto">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.</div><div class=" NE-CH-HEIGHT" style="font-family:Arial;font-size:14px" dir="auto"><br class=" NE-CH-HEIGHT" style="cursor: pointer;"></div><div class=" NE-CH-HEIGHT" style="font-family:Arial;font-size:14px" dir="auto">And the result of IMAGE_CMD_xxx might not exit in ${IMGDEPLOYDIR} when rm_work is chosen in the following scenario:</div><div class=" NE-CH-HEIGHT" style="font-family:Arial;font-size:14px" dir="auto"><br class=" NE-CH-HEIGHT" style="cursor: pointer;"></div><div class=" NE-CH-HEIGHT" style="font-family:Arial;font-size:14px" dir="auto">1 bitbake image (IMAGE_CMD_xxx and IMAGE_CMD_yyy both run at the first time)</div><div class=" NE-CH-HEIGHT" style="font-family:Arial;font-size:14px" dir="auto">2 Change some code in IMAGE_CMD_yyy, but do not touch IMAGE_CMD_xxx</div><div class=" NE-CH-HEIGHT" style="font-family:Arial;font-size:14px" dir="auto">3 bitbake image</div><div class=" NE-CH-HEIGHT" style="font-family:Arial;font-size:14px" dir="auto"><br class=" NE-CH-HEIGHT" style="cursor: pointer;"></div><div class=" NE-CH-HEIGHT" style="font-family:Arial;font-size:14px" dir="auto">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.</div><div class=" NE-CH-HEIGHT" style="font-family:Arial;font-size:14px" dir="auto"><br class=" NE-CH-HEIGHT" style="cursor: pointer;"></div><div class=" NE-CH-HEIGHT" style="font-family:Arial;font-size:14px" dir="auto">//Ming Liu</div><br class="Apple-interchange-newline" style="font-family:-webkit-standard"></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, 2019-08-02 at 17:12 +0800, <a href="mailto:liu.ming50@gmail.com" target="_blank">liu.ming50@gmail.com</a> wrote:<br>
> From: Ming Liu <<a href="mailto:ming.liu@toradex.com" target="_blank">ming.liu@toradex.com</a>><br>
> <br>
> The results in ${IMGDEPLOYDIR} generated by a image task could be<br>
> used by later image tasks.<br>
<br>
No they shouldn't.<br>
<br>
> , hence they should be excluded by rm_work. Or else when a image task<br>
> gets rerun but one of its dependent image task does not, then the<br>
> results generated by this dependent image task would not be there in<br>
> ${IMGDEPLOYDIR}.<br>
<br>
Nothing should be poking into IMGDEPLOYDIR outside of the image tasks.<br>
<br>
do_image_complete[sstate-inputdirs] = "${IMGDEPLOYDIR}"<br>
do_image_complete[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}"<br>
<br>
anything else should be after do_image_complete and be referencing<br>
DEPLOY_DIR_IMAGE.<br>
<br>
Cheers,<br>
<br>
Richard<br>
<br>
</blockquote></div></div>