[bitbake-devel] suddenly confused by appends and overrides being used together

Anders Darander anders at chargestorm.se
Wed Mar 11 07:10:17 UTC 2015


* Robert P. J. Day <rpjday at crashcourse.ca> [150307 18:16]:
>   thought i understood how appending and overrides work together but a
> simple example suggests i have no clue.  from the in-progress bitbake
> user manual here:

> http://www.yoctoproject.org/docs/latest/bitbake-user-manual/bitbake-user-manual.html

> section 3.2.3, this first example looks right (start excerpt):

>      OVERRIDES = "foo"
>      A = "Z"
>      A_foo_append = "X"

> For this case, A is unconditionally set to "Z" and "X" is
> unconditionally and immediately appended to the variable A_foo.
> Because overrides have not been applied yet, A_foo is set to "X" due
> to the append and A simply equals "Z"."  (end of manual excerpt)

<snip>
> back as in the first example:

>      OVERRIDES = "foo"
>      A = "Y"
>      A_foo_append = "Z"
>      A_foo_append += "X"


> For this case, before any overrides are resolved, A is set to "Y"
> using an immediate assignment. After this immediate assignment, A_foo
> is set to "Z", and then further appended with "X" leaving the variable
> set to "Z X". Finally, applying the override for "foo" results in the
> conditional variable A becoming "Z X" (i.e. A is replaced with A_foo).
> (end of excerpt)

Well, I'd agree with you that the manual in work isn't really wording
those sections "good enough".

In the first case, you're correctly arriving at:
A = "Z"
A_foo = "X"

In the last case:
A = "Y"
A_foo = "Z X"

Thus, sofar (in my understanding), they ought to be written in the same
way. What the last example seems to try to higlight, is that if the
override gets active, the value of A will be changed. E.g. if foo is for
instance either of the current machine, arch, or distro in the
OpenEmbedded build system.

I'll see if someone takes the bite and correct me, though this is my
understanding of the examples (note: I've only read your e-mail, not the
actual manual...)

Cheers,
Anders

-- 
Anders Darander
ChargeStorm AB / eStorm AB



More information about the bitbake-devel mailing list