<div dir="ltr">On 1 February 2018 at 14:46, Piotr Lewicki <span dir="ltr"><<a href="mailto:piotr.lewicki@elfin.de" target="_blank">piotr.lewicki@elfin.de</a>></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("BB_ORIGENV", False)<br>
u_boot_enabled = origenv.getVar("ADD_UBOOT_TO_U<wbr>PDATE", False)<br>
<br>
if u_boot_enabled == None:<br>
bb.warn("Not adding u-boot to the image")<br>
else:<br>
bb.warn("Adding u-boot to the image")<br>
d.appendVar("SWUPDATE_IMAGES", " u-boot.imx")<br>
d.setVarFlag("SWUPDATE_IMAGES_<wbr>NOAPPEND_MACHINE", "u-boot.imx", "1")<br>
}<br>
<br>
<br>
My issue is that there is no difference when I either set or unset my environment variable "ADD_UBOOT_TO_UPDATE".<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't you use a variable set in local.conf instead?</div><div><br></div><div>Ross </div></div></div></div>