<div dir="ltr">HI, Richard:<div><br></div><div>Will send a V2 to do the cleaning up firstly, after I double checked the code, seems to me that you are correct, there are "bb.utils.remove(self.image_rootfs, True)" for all package backend, so I am wondering why I saw the leftovers, will investigate that.</div><div><br></div><div>//Ming Liu</div></div><br><div class="gmail_quote"><div dir="ltr">Richard Purdie <<a href="mailto:richard.purdie@linuxfoundation.org">richard.purdie@linuxfoundation.org</a>> 於 2019年1月7日 週一 下午4:33寫道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sun, 2019-01-06 at 17:30 +0100, <a href="mailto:liu.ming50@gmail.com" target="_blank">liu.ming50@gmail.com</a> wrote:<br>
> From: Ming Liu <<a href="mailto:liu.ming50@gmail.com" target="_blank">liu.ming50@gmail.com</a>><br>
> <br>
> I found a issue that sometimes there are leftovers in IMAGE_ROOTFS<br>
> that are generated by the previous builds. I think this is caused by<br>
> IMAGE_ROOTFS is not in do_rootfs[cleandirs], so add it in provided<br>
> that<br>
> INC_RPM_IMAGE_GEN is not set.<br>
> <br>
> IMGDEPLOYDIR could be added to do_rootfs[dirs] as well, hence some<br>
> code<br>
> in rootfs.py to generate the IMAGE_ROOTFS/IMGDEPLOYDIR directories<br>
> could be removed.<br>
> <br>
> Signed-off-by: Ming Liu <<a href="mailto:liu.ming50@gmail.com" target="_blank">liu.ming50@gmail.com</a>><br>
> ---<br>
> meta/classes/image.bbclass | 4 ++--<br>
> meta/lib/oe/rootfs.py | 5 -----<br>
> 2 files changed, 2 insertions(+), 7 deletions(-)<br>
<br>
Firstly, lets split the patch into two, the cleanup and the "fix".<br>
<br>
The cleanup is fine. The fix is more problematic as I don't want to<br>
start encoding logic into the cleandirs var flag. You've missed<br>
INC_IPK_IMAGE_GEN for example so the logic would need to become more<br>
twisted. Looking at the code in lib/oe/rootfs.py, it does cleanup the<br>
directory:<br>
<br>
self.inc_rpm_image_gen = self.d.getVar('INC_RPM_IMAGE_GEN')<br>
if self.inc_rpm_image_gen != "1":<br>
bb.utils.remove(self.image_rootfs, True)<br>
else:<br>
self.pm.recovery_packaging_data()<br>
<br>
so I'm not sure this will fix the issue you're seeing anyway.<br>
<br>
Cheers,<br>
<br>
Richard<br>
<br>
</blockquote></div>