<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 8, 2015 at 5:28 PM, Richard Purdie <span dir="ltr"><<a href="mailto:richard.purdie@linuxfoundation.org" target="_blank">richard.purdie@linuxfoundation.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div id=":vk" class="" style="overflow:hidden">+ for a in d.getVar("SSTATE_ARCHS", True).split():<br>
+ toremove = []<br>
+ i = d.expand("${SSTATE_MANIFESTS}/index-" + a)<br>
+ if not os.path.exists(i):<br>
+ continue<br>
+ with open(i, "r") as f:<br>
+ lines = f.readlines()<br>
+ for l in lines:<br>
+ (stamp, manifest, workdir) = l.split()<br>
+ if stamp not in stamps:<br>
+ toremove.append(l)<br>
+ if stamp not in seen:<br>
+ bb.note("Stamp %s is not reachable, removing related manifests" % stamp)<br>
+ seen.append(stamp)<br>
+ for r in toremove:<br>
+ (stamp, manifest, workdir) = r.split()<br>
+ for m in glob.glob(manifest + ".*"):<br>
+ sstate_clean_manifest(m, d)<br>
+ bb.utils.remove(stamp + "*")<br>
+ if removeworkdir:<br>
+ bb.utils.remove(workdir, recurse = True)<br></div></blockquote><div><br></div><div>This looks like it’ll solve a lot of headaches for folks.</div><div> </div></div>Should the removal of workdir bit be outside the ‘for r in toremove’ block?</div><div class="gmail_extra">-- <br><div class="gmail_signature">Christopher Larson<br>clarson at kergoth dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Maintainer - Tslib<br>Senior Software Engineer, Mentor Graphics</div>
</div></div>