<div dir="ltr">On 1 February 2018 at 14:46, Piotr Lewicki <span dir="ltr">&lt;<a href="mailto:piotr.lewicki@elfin.de" target="_blank">piotr.lewicki@elfin.de</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I have a problem with forcing rebuild of the recipe depending on the environment variable.<br>
<br>
In my recipe I have an anonymous python function that obtains the env variable and depending on it sets some other internal variables (needed by swupdate recipe):<br>
<br>
<br>
python() {<br>
    origenv = d.getVar(&quot;BB_ORIGENV&quot;, False)<br>
    u_boot_enabled = origenv.getVar(&quot;ADD_UBOOT_TO_U<wbr>PDATE&quot;, False)<br>
<br>
    if u_boot_enabled == None:<br>
        bb.warn(&quot;Not adding u-boot to the image&quot;)<br>
    else:<br>
        bb.warn(&quot;Adding u-boot to the image&quot;)<br>
        d.appendVar(&quot;SWUPDATE_IMAGES&quot;, &quot; u-boot.imx&quot;)<br>
        d.setVarFlag(&quot;SWUPDATE_IMAGES_<wbr>NOAPPEND_MACHINE&quot;, &quot;u-boot.imx&quot;, &quot;1&quot;)<br>
}<br>
<br>
<br>
My issue is that there is no difference when I either set or unset my environment variable &quot;ADD_UBOOT_TO_UPDATE&quot;.<br>
<br>
<br>
Can you point me a solution how I could force checking this variable and rerunning/rebuilding the recipe?<br></blockquote><div><br></div><div>Can&#39;t you use a variable set in local.conf instead?</div><div><br></div><div>Ross </div></div></div></div>