<div dir="ltr">Great, that's quite clean. <div>Opting for that, thanks Ross.</div><div><br></div><div>Be Well,</div><div>Alan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 31, 2018 at 1:47 PM, Burton, Ross <span dir="ltr"><<a href="mailto:ross.burton@intel.com" target="_blank">ross.burton@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 31 August 2018 at 12:45, Alan Martinovic <<a href="mailto:alan.martinovic@senic.com">alan.martinovic@senic.com</a>> wrote:<br>
> Fair enough, I gave an example with a simple workaround. :)<br>
><br>
> But you do have a point there, if I'm getting you answer right on a broader<br>
> level.<br>
> Is it something like this?<br>
><br>
>> Instead of setting the environment only once and running bitbake multiple<br>
>> times<br>
>> just make the environment sourcing and bitbake execution an atomic<br>
>> operation.<br>
><br>
><br>
> So if I wanted to automate i.e.:<br>
><br>
> . oe-init-build-env mybuild<br>
> bitbake -c cleanall failure_prone_package<br>
> bitbake failure_prone_package<br>
> bitbake foo #image build<br>
><br>
> It's fine to do it like this:<br>
><br>
> subprocess.call(". oe-init-build-env mybuild ; bitbake -c cleanall<br>
> failure_prone_package", shell=True)<br>
> subprocess.call(". oe-init-build-env mybuild ; bitbake<br>
> failure_prone_package", shell=True)<br>
> subprocess.call(". oe-init-build-env mybuild ; bitbake foo", shell=True)<br>
<br>
</span>Yes, that's exactly the idiom. The alternative would be to invoke<br>
oe-init-build-env once and then run export, and parse that to<br>
construct an environment to pass to future bitbake calls. That would<br>
work, but would be more complex.<br>
<span class="HOEnZb"><font color="#888888"><br>
Ross<br>
</font></span></blockquote></div><br></div>