[OE-core] [oe-core] recipe using environment variable does not refresh / rebuild

Richard Purdie richard.purdie at linuxfoundation.org
Thu Feb 1 15:09:51 UTC 2018


On Thu, 2018-02-01 at 16:00 +0100, Piotr Lewicki wrote:
> 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?

It isn't rebuilt as bitbake isn't psychic!

Bitbake doesn't understand what anonymous python fragments do, so it
can't know that ADD_UBOOT_TO_UPDATE is being changed.

I have a suspicion that it might rebuild, *if* it knew it had to
reparse the recipe since it probably does know which tasks use that
variable. It doesn't know you're poking into BB_ORIGENV which you
really shouldn't be doing.

To make this work as you'd want, you could add ADD_UBOOT_TO_UPDATE to
BB_PRESERVE_ENV. That might be enough to cause it to re-parse each time
you change the value and in turn, if the tasks change based on that,
they might rebuild. I'd at least start there (and stop poking into
BB_ORIGENV).

Cheers,

Richard





More information about the Openembedded-core mailing list