[OE-core] proper use of IMAGE_INSTALL, and confusion over assignment precedence

Robert P. J. Day rpjday at crashcourse.ca
Thu Mar 22 18:30:22 UTC 2012


  i'm still a wee bit (ok, maybe a lot) confused over the various
assignment and append and prepend operators and if there's a good
discussion of it somewhere, that would be just ducky, because without
a *solid* understanding of that, anyone is going to get confused.

  as an example, i'm reading the poky ref manual about IMAGE_INSTALL:

file:///home/rpjday/yocto/yocto-docs/documentation/poky-ref-manual/poky-ref-manual.html#var-IMAGE_INSTALL

which explains (in part):

=== start

"Using IMAGE_INSTALL with the += operator from the /conf/local.conf
file or from within an image recipe is not recommended as it can cause
ordering issues. Since core-image.bbclass sets IMAGE_INSTALL to a
default value using the ?= operator, using a += operation against
IMAGE_INSTALL will result in unexpected behavior when used in
/conf/local.conf. Furthermore, the same operation from with an image
recipe may or may not succeed depending on the specific situation. In
both these cases, the behavior is contrary to how most users expect
the += operator to work.

When you use this variable, it is best to use it as follows:

     IMAGE_INSTALL_append = " package-name"

=== end

  so ... my first simple question is, what is the recommended way to
add a single package to a build through my local.conf file?

  and second, the examples i see in oe-core currently certainly don't
follow the guidance given in the ref manual.  behold:

$ grep -rw IMAGE_INSTALL *
... snip ...
meta/recipes-core/images/core-image-minimal-mtdutils.bb:IMAGE_INSTALL += "mtd-utils"
meta/recipes-graphics/images/core-image-gtk-directfb.bb:IMAGE_INSTALL += "\
meta/recipes-graphics/images/core-image-clutter.bb:IMAGE_INSTALL = "\
meta/recipes-qt/images/qt4e-demo-image.bb:IMAGE_INSTALL += "\
meta/recipes-rt/images/core-image-rt.bb:IMAGE_INSTALL += "rt-tests"
meta/recipes-rt/images/core-image-rt-sdk.bb:IMAGE_INSTALL += "rt-tests"
... snip ...

  the reference manual specifically discourages the use of "+=" inside
image recipes, but as you can see, it's definitely being used there.

  part of the fundamental difficulty in getting a handle on the
intricacies of OE is that the source is inconsistent in its use of
operators, and just trying to "RTFS" simply isn't going to help much.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================




More information about the Openembedded-core mailing list