[OE-core] argh ... "_append" versus "+=" and IMAGE_INSTALL confusion
Robert P. J. Day
rpjday at crashcourse.ca
Fri Mar 30 10:23:39 UTC 2012
On Thu, 29 Mar 2012, Paul Eggleton wrote:
> I think what the manual is attempting to mitigate is a situation
> where you do the following in your image recipe:
>
> -------- snip -------
> IMAGE_INSTALL += "somepackage1 somepackage2"
>
> inherit core-image
> -------- snip -------
>
> In this instance, because IMAGE_INSTALL is set via ?= within core-
> image.bbclass, IMAGE_INSTALL will only be set to "somepackage1
> somepackage2" since the value is already set by the time it gets to
> the ?=. This is clearly not what you would want by using +=.
>
> Doing the following in an image recipe will work properly however:
>
> -------- snip -------
> inherit core-image
>
> IMAGE_INSTALL += "somepackage1 somepackage2"
> -------- snip -------
>
> Personally I think the text you quoted from the manual should be
> adjusted; there's nothing wrong with IMAGE_INSTALL += _in an image
> recipe_ provided that you do it _after_ the inherit of core-image.
that makes sense, but it seems that a lot of potential confusion
could be avoided if this construct was avoided entirely and replaced
by the appropriate use of CORE_IMAGE_EXTRA_INSTALL, no?
from my position of naivete, i can see that messing with
IMAGE_INSTALL is dangerous if you don't truly know how it's being
manipulated in the underlyling class files.
but the solution is right there in core-image.bbclass:
CORE_IMAGE_BASE_INSTALL = '\
task-core-boot \
task-base-extended \
\
${CORE_IMAGE_EXTRA_INSTALL} \
'
CORE_IMAGE_EXTRA_INSTALL ?= ""
IMAGE_INSTALL ?= "${CORE_IMAGE_BASE_INSTALL}"
that is, stop messing with IMAGE_INSTALL and do your customization
with CORE_IMAGE_EXTRA_INSTALL. isn't that what it was expressly
designed for?
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