* contradictory explanations of IMAGE_INSTALL in yocto manuals
@ 2012-03-09 10:51 Robert P. J. Day
2012-03-09 16:39 ` Rudolf Streif
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Robert P. J. Day @ 2012-03-09 10:51 UTC (permalink / raw)
To: Yocto discussion list
(i posted something regarding this on the oe-core list, but i wanted
to post here as well with specific examples from the yocto manuals.)
from the yocto dev manual, section 4.3.1:
"The other method for creating a custom image is to modify an existing
image. For example, if a developer wants to add strace into the
core-image-sato image, they can use the following recipe:
require core-image-sato.bb
IMAGE_INSTALL += "strace"
however, here's the discussion of IMAGE_INSTALL in the poky ref
manual in the variables glossary:
"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."
... and that explanation goes on to recommend using
IMAGE_INSTALL_append instead. that inconsistency should be cleared
up.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: contradictory explanations of IMAGE_INSTALL in yocto manuals
2012-03-09 10:51 contradictory explanations of IMAGE_INSTALL in yocto manuals Robert P. J. Day
@ 2012-03-09 16:39 ` Rudolf Streif
2012-03-09 16:56 ` Robert P. J. Day
2012-03-09 16:40 ` Rudolf Streif
2012-03-09 17:54 ` Jeremy Puhlman
2 siblings, 1 reply; 7+ messages in thread
From: Rudolf Streif @ 2012-03-09 16:39 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: Yocto discussion list
[-- Attachment #1: Type: text/plain, Size: 487 bytes --]
I tried the versions _append and += as well as _prepend and =+ with the
IMAGE_INSTALL and other variables. So far I have not run into any issues
where one would behave differently from the other. The only thing you have
to remember with the _append and _prepend versions is that you have to
include a space at the beginning for _append and at the end for _prepend.
Although I have found that not always to be consistent either. However, an
additional space does not hurt.
RUdi
[-- Attachment #2: Type: text/html, Size: 505 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: contradictory explanations of IMAGE_INSTALL in yocto manuals
2012-03-09 16:39 ` Rudolf Streif
@ 2012-03-09 16:56 ` Robert P. J. Day
2012-03-09 17:08 ` Rudolf Streif
0 siblings, 1 reply; 7+ messages in thread
From: Robert P. J. Day @ 2012-03-09 16:56 UTC (permalink / raw)
To: Rudolf Streif; +Cc: Yocto discussion list
On Fri, 9 Mar 2012, Rudolf Streif wrote:
> I tried the versions _append and += as well as _prepend and =+ with
> the IMAGE_INSTALL and other variables. So far I have not run into
> any issues where one would behave differently from the other. The
> only thing you have to remember with the _append and _prepend
> versions is that you have to include a space at the beginning for
> _append and at the end for _prepend. Although I have found that not
> always to be consistent either. However, an additional space does
> not hurt.
well, as i mentioned, the manual suggests quite strongly that there
is a fundamental difference. i'd just like to understand clearly what
that is.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: contradictory explanations of IMAGE_INSTALL in yocto manuals
2012-03-09 16:56 ` Robert P. J. Day
@ 2012-03-09 17:08 ` Rudolf Streif
0 siblings, 0 replies; 7+ messages in thread
From: Rudolf Streif @ 2012-03-09 17:08 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: Yocto discussion list
[-- Attachment #1: Type: text/plain, Size: 1831 bytes --]
I don't think that there is a difference. At least not from my experience.
Every time I have the choice I tried both variants and then examined the
resulting variable e.g.
bitbake <recipe> -e | grep IMAGE_INSTALL
It looked the same. My conclusion is to use += and =+ for variables and
_append and _prepend for tasks. But I could possibly be wrong since there
are definitely many more cases than I have tried. Hence, it would probably
be prudent to dig into Bitbake's code to see how it handles _append and
_prepend. I have not had time to do that.
Rudi
On Fri, Mar 9, 2012 at 8:56 AM, Robert P. J. Day <rpjday@crashcourse.ca>wrote:
> On Fri, 9 Mar 2012, Rudolf Streif wrote:
>
> > I tried the versions _append and += as well as _prepend and =+ with
> > the IMAGE_INSTALL and other variables. So far I have not run into
> > any issues where one would behave differently from the other. The
> > only thing you have to remember with the _append and _prepend
> > versions is that you have to include a space at the beginning for
> > _append and at the end for _prepend. Although I have found that not
> > always to be consistent either. However, an additional space does
> > not hurt.
>
> well, as i mentioned, the manual suggests quite strongly that there
> is a fundamental difference. i'd just like to understand clearly what
> that is.
>
> rday
>
> --
>
> ========================================================================
> Robert P. J. Day Ottawa, Ontario, CANADA
> http://crashcourse.ca
>
> Twitter: http://twitter.com/rpjday
> LinkedIn: http://ca.linkedin.com/in/rpjday
> ========================================================================
>
[-- Attachment #2: Type: text/html, Size: 2491 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: contradictory explanations of IMAGE_INSTALL in yocto manuals
2012-03-09 10:51 contradictory explanations of IMAGE_INSTALL in yocto manuals Robert P. J. Day
2012-03-09 16:39 ` Rudolf Streif
@ 2012-03-09 16:40 ` Rudolf Streif
2012-03-09 17:54 ` Jeremy Puhlman
2 siblings, 0 replies; 7+ messages in thread
From: Rudolf Streif @ 2012-03-09 16:40 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: Yocto discussion list
[-- Attachment #1: Type: text/plain, Size: 487 bytes --]
I tried the versions _append and += as well as _prepend and =+ with the
IMAGE_INSTALL and other variables. So far I have not run into any issues
where one would behave differently from the other. The only thing you have
to remember with the _append and _prepend versions is that you have to
include a space at the beginning for _append and at the end for _prepend.
Although I have found that not always to be consistent either. However, an
additional space does not hurt.
Rudi
[-- Attachment #2: Type: text/html, Size: 575 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: contradictory explanations of IMAGE_INSTALL in yocto manuals
2012-03-09 10:51 contradictory explanations of IMAGE_INSTALL in yocto manuals Robert P. J. Day
2012-03-09 16:39 ` Rudolf Streif
2012-03-09 16:40 ` Rudolf Streif
@ 2012-03-09 17:54 ` Jeremy Puhlman
2012-03-09 18:06 ` Robert P. J. Day
2 siblings, 1 reply; 7+ messages in thread
From: Jeremy Puhlman @ 2012-03-09 17:54 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: Yocto discussion list
On 3/9/2012 2:51 AM, Robert P. J. Day wrote:
> (i posted something regarding this on the oe-core list, but i wanted
> to post here as well with specific examples from the yocto manuals.)
>
> from the yocto dev manual, section 4.3.1:
>
> "The other method for creating a custom image is to modify an existing
> image. For example, if a developer wants to add strace into the
> core-image-sato image, they can use the following recipe:
>
> require core-image-sato.bb
>
> IMAGE_INSTALL += "strace"
>
> however, here's the discussion of IMAGE_INSTALL in the poky ref
> manual in the variables glossary:
>
> "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."
>
> ... and that explanation goes on to recommend using
> IMAGE_INSTALL_append instead. that inconsistency should be cleared
> up.
>
The issue here is your talking about two different use cases. Setting
IMAGE_INSTALL from a local.conf is a
different use case then setting the value in a image recipe that
includes another image recipe.
From the local.conf, just from a functional point of view generally will
not work well if you do IMAGE_INSTALL +=.
Some images(not neccisarily in oe-core) set IMAGE_INSTALL explictly
hard, which means you can add what ever you want in your
local.conf and it will get replaced with what is in the recipe. If the
recipe sets IMAGE_INSTALL soft, then what happens is when your
local.conf is read, the value should start out as not defined, so when
you += to the value you get what ever you set as the only value.
Later on when things like core-image attempt to set via =? it sees that
it is already set and should break the image since it doesn't add
what it thinks is the right stuff to make the image, just the stuff you
set in your local.conf.
If from the local.conf, you so IMAGE_INSTALL_append, what ever you set
will get added after all the processing of the various settings for the
image is
already complete.
In an image recipe, like the one you call out, all the image processing
of what should be added etc, is alreaqdy done, when the =+ is added, so
the result is what you would expect.
Different use cases generally have different suggested methods. However
this is more of a funcitonal discssion as I am not sure what the
community consensus
suggestions for setting things like IMAGE_INSTALL in local.conf is any more.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: contradictory explanations of IMAGE_INSTALL in yocto manuals
2012-03-09 17:54 ` Jeremy Puhlman
@ 2012-03-09 18:06 ` Robert P. J. Day
0 siblings, 0 replies; 7+ messages in thread
From: Robert P. J. Day @ 2012-03-09 18:06 UTC (permalink / raw)
To: Jeremy Puhlman; +Cc: Yocto discussion list
On Fri, 9 Mar 2012, Jeremy Puhlman wrote:
... snip ...
> Some images(not neccisarily in oe-core) set IMAGE_INSTALL explictly
> hard, which means you can add what ever you want in your
> local.conf and it will get replaced with what is in the recipe. If the
> recipe sets IMAGE_INSTALL soft, then what happens is when your
> local.conf is read, the value should start out as not defined, so when
> you += to the value you get what ever you set as the only value.
> Later on when things like core-image attempt to set via =? it sees that
> it is already set and should break the image since it doesn't add
> what it thinks is the right stuff to make the image, just the stuff you
> set in your local.conf.
>
> If from the local.conf, you so IMAGE_INSTALL_append, what ever you set
> will get added after all the processing of the various settings for the
> image is
> already complete.
>
> In an image recipe, like the one you call out, all the image processing
> of what should be added etc, is alreaqdy done, when the =+ is added, so
> the result is what you would expect.
>
> Different use cases generally have different suggested methods. However
> this is more of a funcitonal discssion as I am not sure what the
> community consensus
> suggestions for setting things like IMAGE_INSTALL in local.conf is any more.
ah, got it. i didn't follow *every* detail above, but i had
forgotten about the different levels of assignment "hardness", so in
principle, i see what's happening. thanks.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-03-09 18:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-09 10:51 contradictory explanations of IMAGE_INSTALL in yocto manuals Robert P. J. Day
2012-03-09 16:39 ` Rudolf Streif
2012-03-09 16:56 ` Robert P. J. Day
2012-03-09 17:08 ` Rudolf Streif
2012-03-09 16:40 ` Rudolf Streif
2012-03-09 17:54 ` Jeremy Puhlman
2012-03-09 18:06 ` Robert P. J. Day
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.