[OE-core] [oe-core] recipe using environment variable does not refresh / rebuild
Piotr Lewicki
piotr.lewicki at elfin.de
Thu Feb 1 15:00:29 UTC 2018
Hi Ross,
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.
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.
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?
Thanks,
Piotr
On 01.02.2018 15:50, Burton, Ross wrote:
> On 1 February 2018 at 14:46, Piotr Lewicki <piotr.lewicki at elfin.de
> <mailto:piotr.lewicki at elfin.de>> wrote:
>
> Hi,
>
> I have a problem with forcing rebuild of the recipe depending on
> the environment variable.
>
> 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):
>
>
> python() {
> origenv = d.getVar("BB_ORIGENV", False)
> u_boot_enabled = origenv.getVar("ADD_UBOOT_TO_UPDATE", False)
>
> if u_boot_enabled == None:
> bb.warn("Not adding u-boot to the image")
> else:
> bb.warn("Adding u-boot to the image")
> d.appendVar("SWUPDATE_IMAGES", " u-boot.imx")
> d.setVarFlag("SWUPDATE_IMAGES_NOAPPEND_MACHINE",
> "u-boot.imx", "1")
> }
>
>
> My issue is that there is no difference when I either set or unset
> my environment variable "ADD_UBOOT_TO_UPDATE".
>
>
> Can you point me a solution how I could force checking this
> variable and rerunning/rebuilding the recipe?
>
>
> Can't you use a variable set in local.conf instead?
>
> Ross
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20180201/f7ecdb16/attachment-0002.html>
More information about the Openembedded-core
mailing list