<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 &quot;bb.utils.remove(self.image_rootfs, True)&quot; 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 &lt;<a href="mailto:richard.purdie@linuxfoundation.org">richard.purdie@linuxfoundation.org</a>&gt; 於 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>
&gt; From: Ming Liu &lt;<a href="mailto:liu.ming50@gmail.com" target="_blank">liu.ming50@gmail.com</a>&gt;<br>
&gt; <br>
&gt; I found a issue that sometimes there are leftovers in IMAGE_ROOTFS<br>
&gt; that are generated by the previous builds. I think this is caused by<br>
&gt; IMAGE_ROOTFS is not in do_rootfs[cleandirs], so add it in provided<br>
&gt; that<br>
&gt; INC_RPM_IMAGE_GEN is not set.<br>
&gt; <br>
&gt; IMGDEPLOYDIR could be added to do_rootfs[dirs] as well, hence some<br>
&gt; code<br>
&gt; in rootfs.py to generate the IMAGE_ROOTFS/IMGDEPLOYDIR directories<br>
&gt; could be removed.<br>
&gt; <br>
&gt; Signed-off-by: Ming Liu &lt;<a href="mailto:liu.ming50@gmail.com" target="_blank">liu.ming50@gmail.com</a>&gt;<br>
&gt; ---<br>
&gt;  meta/classes/image.bbclass | 4 ++--<br>
&gt;  meta/lib/oe/rootfs.py      | 5 -----<br>
&gt;  2 files changed, 2 insertions(+), 7 deletions(-)<br>
<br>
Firstly, lets split the patch into two, the cleanup and the &quot;fix&quot;.<br>
<br>
The cleanup is fine. The fix is more problematic as I don&#39;t want to<br>
start encoding logic into the cleandirs var flag. You&#39;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(&#39;INC_RPM_IMAGE_GEN&#39;)<br>
        if self.inc_rpm_image_gen != &quot;1&quot;:<br>
            bb.utils.remove(self.image_rootfs, True)<br>
        else:<br>
            self.pm.recovery_packaging_data()<br>
<br>
so I&#39;m not sure this will fix the issue you&#39;re seeing anyway.<br>
<br>
Cheers,<br>
<br>
Richard<br>
<br>
</blockquote></div>