<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi Ross,</p>
    <p>Good idea, but I'm using gitlab to perform autobuilds and I want
      to set the variable there (the "ADD_UBOOT_TO_UPDATE" variable) so
      that it's propagated to the image recipe.</p>
    <p>I'm want to differentiate the image with and without u-boot only
      by setting this one environment variable and without additional
      mangling with local.conf.</p>
    <p><br>
    </p>
    <p>If that's not possible- I'll use your idea with setting it in
      local.conf, but before that I'm trying to understand- why my
      recipe is not rebuilt?</p>
    <p><br>
    </p>
    <p>Thanks,</p>
    <p>Piotr<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 01.02.2018 15:50, Burton, Ross
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAJTo0Lbb8jH_uyoiD4OsBgf8xsMOdz8a1CjCkoBmKmTwF_3q+g@mail.gmail.com">
      <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" moz-do-not-send="true">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("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>
    </blockquote>
    <br>
  </body>
</html>