<div dir="ltr"><div dir="ltr"><div>Thanks Ross<br></div><div dir="ltr"><div>this is what more or less what I'm doing.</div><div>What I haven't found a way to do from python is making modifications from the initialized build directory.</div><div><br></div><div>I'd like to do that to change things in conf/local.conf.</div><div>For example generate DISTRO_VERSION from git describe --tags</div><div><br></div><div>That is something that needs to happen in between </div><div><span style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">. oe-init-build-env  and bitbake foo</span></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><div><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 31, 2018 at 1:02 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"><div class="HOEnZb"><div class="h5">On 31 August 2018 at 11:57, Alexander Kanavin <<a href="mailto:alex.kanavin@gmail.com">alex.kanavin@gmail.com</a>> wrote:<br>
> 2018-08-31 12:49 GMT+02:00 Alan Martinovic <<a href="mailto:alan.martinovic@senic.com">alan.martinovic@senic.com</a>>:<br>
>> am just in the process of forming a base for automated nightly builds.<br>
>> The goal is to have the build process run every night and report what<br>
>>  the status was.<br>
>><br>
>> I've opted for python for all the conditionals and checks  and then have<br>
>> external<br>
>> bash scripts that actually sets the environment and invokes bitbake.<br>
>><br>
>> Did it like that because I didn't find a clean way so far to deal with<br>
>><br>
>>  Â  Â source oe/oe-init-build-env<br>
>><br>
>> from python.<br>
>><br>
>><br>
>> Would like to hear how did you script bitbake and how does your setup look<br>
>> like?<br>
><br>
> I guess you should look at what the Yocto project itself is using:<br>
><br>
> <a href="http://git.yoctoproject.org/cgit.cgi/yocto-autobuilder2/about/" rel="noreferrer" target="_blank">http://git.yoctoproject.org/<wbr>cgit.cgi/yocto-autobuilder2/<wbr>about/</a><br>
> <a href="http://git.yoctoproject.org/cgit.cgi/yocto-autobuilder-helper/about/" rel="noreferrer" target="_blank">http://git.yoctoproject.org/<wbr>cgit.cgi/yocto-autobuilder-<wbr>helper/about/</a><br>
<br>
</div></div>Alex beat me to do this, but if you want something that does a lot<br>
less then this is actually really simple:<br>
<br>
subprocess.call(". oe-init-build-env ; bitbake foo", shell=True)<br>
<br>
Just use shell=True and invoke init-build-env every time you call bitbake.<br>
<span class="HOEnZb"><font color="#888888"><br>
Ross<br>
</font></span></blockquote></div><br></div>