<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Aug 17, 2014 at 10:55 AM, Richard Purdie <span dir="ltr">&lt;<a href="mailto:richard.purdie@linuxfoundation.org" target="_blank">richard.purdie@linuxfoundation.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Sun, 2014-08-17 at 10:33 +0200, Jacob Kroon wrote:<br>
&gt; On Sat, Aug 2, 2014 at 10:54 AM, Richard Purdie<br>
&gt; &lt;<a href="mailto:richard.purdie@linuxfoundation.org">richard.purdie@linuxfoundation.org</a>&gt; wrote:<br>
&gt;         [This is an RFC which depends on a patch to bitbake to<br>
&gt;         operate]<br>
&gt;<br>
&gt;         Currently, we have a mess of dependencies for pixbufcache and<br>
&gt;         even then<br>
&gt;         it breaks since they might be controlled by PACKAGECONFIG.<br>
&gt;<br>
&gt;         Instead, this patch proposes an alternative approach where we<br>
&gt;         allow<br>
&gt;         &quot;fixups&quot; from a sceneQueueComplete() event at the end of the<br>
&gt;         setscene<br>
&gt;         process. We signal the need for these using simply stamp<br>
&gt;         files.<br>
&gt;<br>
&gt;         The one downside is that the processing code needs to be in a<br>
&gt;         global<br>
&gt;         event handler like base.bbclass rather than<br>
&gt;         pixbufcache.bbclass but this<br>
&gt;         is probably a price worth paying to avoid the dependency mess?<br>
&gt;<br>
&gt;         Signed-off-by: Richard Purdie<br>
&gt;         &lt;<a href="mailto:richard.purdie@linuxfoundation.org">richard.purdie@linuxfoundation.org</a>&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Instead of having the sstate_postinst() touch &quot;needpixbuf&quot;, could we<br>
&gt; make it write out the actual script that needs to be executed ?<br>
&gt;<br>
&gt; Then base.bbclass could iterate over any scripts installed by any<br>
&gt; sstate_postinst() and execute them. At least this would better isolate<br>
&gt; the pixbuf-code to pixbufcache.bbclass, and make the snippet in<br>
&gt; base.bbclass more generic.<br>
<br>
</div></div>It does become trickier to avoid races when writing out that script.<br>
Touching the file is rather easy from a lock perspective :)<br>
<br></blockquote><br></div>Ah.. right, I didn&#39;t think of that. Is there no framework already in place in bitbake/OE/Python that we could use for doing atomic write-out-file-if-it-doesn&#39;t-exist-yet ?<br></div></div>