Skip to contentSkip to conversation

do any yocto docs clearly distinguish between "+=" and "_append"?

DISCUSSION Robert P. J. Day 2 participants 2 messages Nov 11, 2013

lore
Share & tools
lore
#0 lore raw

still slogging my way through the dev manual, and here:

http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#usingpoky-extend-customimage

section 5.2.1 recommends that recipe files use:

IMAGE_INSTALL += "strace"

while, further down in section 5.2.4, developers are encouraged to add to their personal local.conf:

IMAGE_INSTALL_append = " strace"

is there somewhere in a yocto doc a clear explanation of the proper
usage of "+=" versus "_append"? because, in my experience, that's a point of serious confusion for new users.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#1 lore raw

Hi Robert,

Quoted 5 lines · On Monday 11 November 2013 06:30:46 Robert P. J. Day wrote:

still slogging my way through the dev manual, and here:

http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#usingpoky
-extend-customimage

Quoted 8 lines

section 5.2.1 recommends that recipe files use:

IMAGE_INSTALL += "strace"

while, further down in section 5.2.4, developers are encouraged to add to their personal local.conf:

IMAGE_INSTALL_append = " strace"

There is a good reason for this difference - it's likely that IMAGE_INSTALL will be set using = in the image recipe, and thus if you use += to add to it in local.conf it will have no effect. _append on the other hand is deferred until later and thus it will always work from local.conf. In the image recipe it's OK to use IMAGE_INSTALL += because you'll be able to put it in the right place with regard to any other assignment of the variable.

As I've noted more than once, modifying IMAGE_INSTALL or CORE_IMAGE_EXTRA_INSTALL from local.conf is really only appropriate for quick testing - for anything beyond that users should be creating their own image recipe(s).

Quoted 3 lines

is there somewhere in a yocto doc a clear explanation of the proper
usage of "+=" versus "_append"? because, in my experience, that's a point of serious confusion for new users.

The proper place for the general discussion about how these operators work is really the BitBake manual; we're planning on promoting that to a first-class citizen and publishing it with the rest of our manuals for 1.6.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre