<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 22, 2015 at 4:02 AM, Paul Eggleton <span dir="ltr">&lt;<a href="mailto:paul.eggleton@linux.intel.com" target="_blank">paul.eggleton@linux.intel.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Monday 20 July 2015 15:15:54 Christopher Larson wrote:<br>
&gt; From: Christopher Larson &lt;<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>&gt;<br>
&gt;<br>
&gt; This makes it easier to extend, as a layer can add its own sub-commands.<br>
&gt;<br>
&gt; tinfoil is now passed into the commands, as we needed to parse the<br>
&gt; configuration metadata to get BBPATH, and we don&#39;t want to construct tinfoil<br>
&gt; more than once, otherwise we have to deal with startup and shutdown of<br>
&gt; cooker.<br>
<br>
</span>Hmm, but tinfoil is being constructed twice, right? I think what you&#39;ve<br>
implemented is correct (and the only way it can really work), but this comment<br>
doesn&#39;t seem to match up with the actual changes.<br></blockquote><div><br></div><div>Yeah, that’s correct. My initial implementation did what the commit message says, but of course that’s a problem for devtool commands that call out to recipetool, since recipetool constructs its own, so needs to acquire the bitbake lock itself. So I reworked it to construct and then throw away the initial instance instead, and leave it up to the subcommands to control whether they need a tinfoil instance the way they did previously. I’ll fix the commit message.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
&gt; +    tinfoil = setup_tinfoil(config_only=True)<br>
&gt; +    for path in ([scripts_path] +<br>
&gt; +                 tinfoil.config_data.getVar(&#39;BBPATH&#39;, True).split(&#39;:&#39;)):<br>
&gt; +        pluginpath = os.path.join(path, &#39;lib&#39;, &#39;devtool&#39;)<br>
&gt; +        scriptutils.load_plugins(logger, plugins, pluginpath)<br>
&gt; +    tinfoil.cooker.shutdown(force=True)<br>
&gt; +    tinfoil.cooker.unlockBitbake()<br>
<br>
</span>FYI I think Richard is about to add a shutdown method to tinfoil itself that </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
will do what&#39;s needed here; however we can tidy this up after that&#39;s added.</blockquote><div><br></div><div>Cool, that would definitely be cleaner than poking into its internals. </div></div>-- <br><div class="gmail_signature"><div dir="ltr">Christopher Larson<br>kergoth at gmail dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Maintainer - Tslib<br>Senior Software Engineer, Mentor Graphics</div></div>
</div></div>