<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On 21 September 2015 at 21:33, Martin Jansa <span dir="ltr">&lt;<a href="mailto:martin.jansa@gmail.com" target="_blank">martin.jansa@gmail.com</a>&gt;</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=":5n5" class="" style="overflow:hidden">* otherwise there is race-condition between do_configure rm+mkdir and<br>
  bitbake trying to use it as CWD for do_populate_lic task, which<br>
  results in errors like this:</div></blockquote><div><br></div><div>It took me a few minutes to understand this race:</div><div><br></div><div>Task A executing perf:do_configure and deleting ${B}</div><div>Task B finishing perf:do_populate_lic and so running the sstate generation logic and the functions listed in <span style="font-size:13px">SSTATEPOSTINSTFUNCS, which get executed with the default cwd of ${B}.</span></div><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px">I&#39;ll note that autotools.bbclass also does rmdir/mkdir ${B} so I&#39;m curious why you see it more in perf and cmake and not everything else.</span></div><div><br></div><div>Would a better long-term fix be to pass cwd=${WORKDIR} to exec_func in the sstate code to stop the functions being executed in ${B} (after vetting the functions, obviously).  FWIW I&#39;m the owner of the bug to stop bitbake knowing about ${B} which is leading to exactly this sort of problem.</div><div><br></div><div>Ross</div></div></div></div>