All of lore.kernel.org
 help / color / mirror / Atom feed
* adding a single package to an image -- what's the proper way?
@ 2012-03-27 12:20 Robert P. J. Day
  2012-03-27 12:56 ` Marko Katić
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Robert P. J. Day @ 2012-03-27 12:20 UTC (permalink / raw)
  To: OE Core mailing list


  i'm currently poring over the OE docs (including the ones at the
yocto site), and i'm trying to figure out how to simply add a package
to an image through one's local.conf file.

  the current yocto ref manual has an entire section about customizing
images:

http://www.yoctoproject.org/docs/current/poky-ref-manual/poky-ref-manual.html#usingpoky-extend-customimage

but it discusses creating custom recipe files and custom tasks, and
using IMAGE_INSTALL and IMAGE_FEATURES and EXTRA_IMAGE_FEATURES, and
finally gets into using local.conf, suggesting:

  DISTRO_EXTRA_RDEPENDS += "strace"

is that, in fact, the accepted way if one simply wants to add a
package to an existing image build?  because as soon as the manual
mentions it, in the very next paragraph, it discourages its use.

  so what's the story?  it seems it should be a lot easier to figure
out how to do something that straightforward.

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] 19+ messages in thread

* Re: adding a single package to an image -- what's the proper way?
  2012-03-27 12:20 adding a single package to an image -- what's the proper way? Robert P. J. Day
@ 2012-03-27 12:56 ` Marko Katić
  2012-03-27 19:12   ` Robert P. J. Day
  2012-03-27 19:27 ` Paul Eggleton
  2012-03-28 13:48 ` Koen Kooi
  2 siblings, 1 reply; 19+ messages in thread
From: Marko Katić @ 2012-03-27 12:56 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 2244 bytes --]

I haven't tried this myself on images, but you can probably use .bbappend
for this. I think bbappend files provide a proper way for extending
recipes. So for instance,
if you want to add a package to the core-image-minimal image you would
place the following in your core-image-minimal.bbappend file:

IMAGE_INSTALL += "your_package"

Of course, this solution assumes you have a local overlay.

Or maybe you could try placing the above IMAGE_INSTALL append to your
local.conf. But that's probably messy and not advised.


On Tue, Mar 27, 2012 at 2:20 PM, Robert P. J. Day <rpjday@crashcourse.ca>wrote:

>
>  i'm currently poring over the OE docs (including the ones at the
> yocto site), and i'm trying to figure out how to simply add a package
> to an image through one's local.conf file.
>
>  the current yocto ref manual has an entire section about customizing
> images:
>
>
> http://www.yoctoproject.org/docs/current/poky-ref-manual/poky-ref-manual.html#usingpoky-extend-customimage
>
> but it discusses creating custom recipe files and custom tasks, and
> using IMAGE_INSTALL and IMAGE_FEATURES and EXTRA_IMAGE_FEATURES, and
> finally gets into using local.conf, suggesting:
>
>  DISTRO_EXTRA_RDEPENDS += "strace"
>
> is that, in fact, the accepted way if one simply wants to add a
> package to an existing image build?  because as soon as the manual
> mentions it, in the very next paragraph, it discourages its use.
>
>  so what's the story?  it seems it should be a lot easier to figure
> out how to do something that straightforward.
>
> rday
>
> --
>
> ========================================================================
> Robert P. J. Day                                 Ottawa, Ontario, CANADA
>                        http://crashcourse.ca
>
> Twitter:                                       http://twitter.com/rpjday
> LinkedIn:                               http://ca.linkedin.com/in/rpjday
> ========================================================================
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 3190 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: adding a single package to an image -- what's the proper way?
  2012-03-27 12:56 ` Marko Katić
@ 2012-03-27 19:12   ` Robert P. J. Day
  0 siblings, 0 replies; 19+ messages in thread
From: Robert P. J. Day @ 2012-03-27 19:12 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1320 bytes --]

On Tue, 27 Mar 2012, Marko Katić wrote:

> I haven't tried this myself on images, but you can probably use
> .bbappend for this. I think bbappend files provide a proper way for
> extending recipes. So for instance,if you want to add a package to
> the core-image-minimal image you would place the following in your
> core-image-minimal.bbappend file:
>
> IMAGE_INSTALL += "your_package"
>
> Of course, this solution assumes you have a local overlay.
>
> Or maybe you could try placing the above IMAGE_INSTALL append to
> your local.conf. But that's probably messy and not advised.

  and this is part of the frustration in trying to do what should be
extremely simple things in OE -- they're just not documented.
however, rather than harp on this issue, i'm going to backtrack and
post a more general missive explaining what i'm trying to do.  back in
a while ...

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] 19+ messages in thread

* Re: adding a single package to an image -- what's the proper way?
  2012-03-27 12:20 adding a single package to an image -- what's the proper way? Robert P. J. Day
  2012-03-27 12:56 ` Marko Katić
@ 2012-03-27 19:27 ` Paul Eggleton
  2012-03-28  2:42   ` Denys Dmytriyenko
  2012-03-28 13:48 ` Koen Kooi
  2 siblings, 1 reply; 19+ messages in thread
From: Paul Eggleton @ 2012-03-27 19:27 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: openembedded-core

On Tuesday 27 March 2012 08:20:11 Robert P. J. Day wrote:
>   i'm currently poring over the OE docs (including the ones at the
> yocto site), and i'm trying to figure out how to simply add a package
> to an image through one's local.conf file.
> 
>   the current yocto ref manual has an entire section about customizing
> images:
> 
> http://www.yoctoproject.org/docs/current/poky-ref-manual/poky-ref-manual.htm
> l#usingpoky-extend-customimage
> 
> but it discusses creating custom recipe files and custom tasks, and
> using IMAGE_INSTALL and IMAGE_FEATURES and EXTRA_IMAGE_FEATURES, and
> finally gets into using local.conf, suggesting:
> 
>   DISTRO_EXTRA_RDEPENDS += "strace"
> 
> is that, in fact, the accepted way if one simply wants to add a
> package to an existing image build?  because as soon as the manual
> mentions it, in the very next paragraph, it discourages its use.

Well, this clearly does not make sense if that's the way it is presented. 

The real answer to this question is it depends on why you're adding the 
package.

1) If you just want to add a single package temporarily for testing, use 
CORE_IMAGE_EXTRA_INSTALL += in local.conf (although I really wish we could 
make this mechanism more generic so that it applies to any image, not just the 
ones in OE-Core).

2) If you want to add something permanently for every (non-minimal) image 
produced using your DISTRO, set DISTRO_EXTRA_RDEPENDS in your distro 
configuration. This will come into your image via task-distro-base which is 
pulled in by task-base. I don't think we should be advocating doing anything 
with DISTRO_EXTRA_RDEPENDS via local.conf.

3) If you're adding it permanently for a single image, consider whether adding 
your own custom image recipe would be more appropriate. FWIW, I don't think 
bbappends for recipes are a good idea.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: adding a single package to an image -- what's the proper way?
  2012-03-27 19:27 ` Paul Eggleton
@ 2012-03-28  2:42   ` Denys Dmytriyenko
  2012-03-28  3:08     ` Christopher Larson
  0 siblings, 1 reply; 19+ messages in thread
From: Denys Dmytriyenko @ 2012-03-28  2:42 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Tue, Mar 27, 2012 at 08:27:02PM +0100, Paul Eggleton wrote:
> On Tuesday 27 March 2012 08:20:11 Robert P. J. Day wrote:
> >   i'm currently poring over the OE docs (including the ones at the
> > yocto site), and i'm trying to figure out how to simply add a package
> > to an image through one's local.conf file.
> > 
> >   the current yocto ref manual has an entire section about customizing
> > images:
> > 
> > http://www.yoctoproject.org/docs/current/poky-ref-manual/poky-ref-manual.htm
> > l#usingpoky-extend-customimage
> > 
> > but it discusses creating custom recipe files and custom tasks, and
> > using IMAGE_INSTALL and IMAGE_FEATURES and EXTRA_IMAGE_FEATURES, and
> > finally gets into using local.conf, suggesting:
> > 
> >   DISTRO_EXTRA_RDEPENDS += "strace"
> > 
> > is that, in fact, the accepted way if one simply wants to add a
> > package to an existing image build?  because as soon as the manual
> > mentions it, in the very next paragraph, it discourages its use.
> 
> Well, this clearly does not make sense if that's the way it is presented. 
> 
> The real answer to this question is it depends on why you're adding the 
> package.
> 
> 1) If you just want to add a single package temporarily for testing, use 
> CORE_IMAGE_EXTRA_INSTALL += in local.conf (although I really wish we could 
> make this mechanism more generic so that it applies to any image, not just the 
> ones in OE-Core).
> 
> 2) If you want to add something permanently for every (non-minimal) image 
> produced using your DISTRO, set DISTRO_EXTRA_RDEPENDS in your distro 
> configuration. This will come into your image via task-distro-base which is 
> pulled in by task-base. I don't think we should be advocating doing anything 
> with DISTRO_EXTRA_RDEPENDS via local.conf.
> 
> 3) If you're adding it permanently for a single image, consider whether adding 
> your own custom image recipe would be more appropriate. FWIW, I don't think 
> bbappends for recipes are a good idea.

All these options don't cover one more need - temporarily adding one or more 
packages to a single specific image via local.conf. Both option 1) and 2) do 
it too broadly to several/all images... And the only option is to go with more 
permanent way in 3) by adding own image recipe.

-- 
Denys



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: adding a single package to an image -- what's the proper way?
  2012-03-28  2:42   ` Denys Dmytriyenko
@ 2012-03-28  3:08     ` Christopher Larson
  2012-03-28  9:32       ` Robert P. J. Day
  2012-03-28  9:35       ` Robert P. J. Day
  0 siblings, 2 replies; 19+ messages in thread
From: Christopher Larson @ 2012-03-28  3:08 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 2943 bytes --]

I IMAGE_INSTALL_append or IMAGE_INSTALL_append_pn-core-image-minimal or whatever when I need to quickly add a package temporarily, myself.

-- 
Christopher Larson


On Tuesday, March 27, 2012 at 7:42 PM, Denys Dmytriyenko wrote:

> On Tue, Mar 27, 2012 at 08:27:02PM +0100, Paul Eggleton wrote:
> > On Tuesday 27 March 2012 08:20:11 Robert P. J. Day wrote:
> > > i'm currently poring over the OE docs (including the ones at the
> > > yocto site), and i'm trying to figure out how to simply add a package
> > > to an image through one's local.conf file.
> > > 
> > > the current yocto ref manual has an entire section about customizing
> > > images:
> > > 
> > > http://www.yoctoproject.org/docs/current/poky-ref-manual/poky-ref-manual.htm
> > > l#usingpoky-extend-customimage
> > > 
> > > but it discusses creating custom recipe files and custom tasks, and
> > > using IMAGE_INSTALL and IMAGE_FEATURES and EXTRA_IMAGE_FEATURES, and
> > > finally gets into using local.conf, suggesting:
> > > 
> > > DISTRO_EXTRA_RDEPENDS += "strace"
> > > 
> > > is that, in fact, the accepted way if one simply wants to add a
> > > package to an existing image build? because as soon as the manual
> > > mentions it, in the very next paragraph, it discourages its use.
> > > 
> > 
> > 
> > Well, this clearly does not make sense if that's the way it is presented. 
> > 
> > The real answer to this question is it depends on why you're adding the 
> > package.
> > 
> > 1) If you just want to add a single package temporarily for testing, use 
> > CORE_IMAGE_EXTRA_INSTALL += in local.conf (although I really wish we could 
> > make this mechanism more generic so that it applies to any image, not just the 
> > ones in OE-Core).
> > 
> > 2) If you want to add something permanently for every (non-minimal) image 
> > produced using your DISTRO, set DISTRO_EXTRA_RDEPENDS in your distro 
> > configuration. This will come into your image via task-distro-base which is 
> > pulled in by task-base. I don't think we should be advocating doing anything 
> > with DISTRO_EXTRA_RDEPENDS via local.conf.
> > 
> > 3) If you're adding it permanently for a single image, consider whether adding 
> > your own custom image recipe would be more appropriate. FWIW, I don't think 
> > bbappends for recipes are a good idea.
> > 
> 
> 
> All these options don't cover one more need - temporarily adding one or more 
> packages to a single specific image via local.conf. Both option 1) and 2) do 
> it too broadly to several/all images... And the only option is to go with more 
> permanent way in 3) by adding own image recipe.
> 
> -- 
> Denys
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org (mailto:Openembedded-core@lists.openembedded.org)
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
> 
> 



[-- Attachment #2: Type: text/html, Size: 4116 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: adding a single package to an image -- what's the proper way?
  2012-03-28  3:08     ` Christopher Larson
@ 2012-03-28  9:32       ` Robert P. J. Day
  2012-03-28  9:35       ` Robert P. J. Day
  1 sibling, 0 replies; 19+ messages in thread
From: Robert P. J. Day @ 2012-03-28  9:32 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Tue, 27 Mar 2012, Christopher Larson wrote:

> IMAGE_INSTALL_append or IMAGE_INSTALL_append_pn-core-image-minimal
> or whatever when I need to quickly add a package temporarily,
> myself.

  i'll get to the other responses shortly but i'm summarizing this
topic at my wiki here:

http://www.crashcourse.ca/wiki/index.php/OE-Core#Adding_a_single_package_to_a_build

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] 19+ messages in thread

* Re: adding a single package to an image -- what's the proper way?
  2012-03-28  3:08     ` Christopher Larson
  2012-03-28  9:32       ` Robert P. J. Day
@ 2012-03-28  9:35       ` Robert P. J. Day
  2012-03-28 10:51         ` Marko Katić
  1 sibling, 1 reply; 19+ messages in thread
From: Robert P. J. Day @ 2012-03-28  9:35 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Tue, 27 Mar 2012, Christopher Larson wrote:

> I IMAGE_INSTALL_append or IMAGE_INSTALL_append_pn-core-image-minimal
> or whatever when I need to quickly add a package temporarily,
> myself.

  once i add this package and build a new image to verify it was
added, i want to revert and rebuild the original QEMU image again.  so
after removing that line from local.conf, what's the bitbake clean
incantation to remove all traces of sysfsutils from my build
directory, so that i can rebuild the image with a simple

  $ bitbake core-image-minimal

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] 19+ messages in thread

* Re: adding a single package to an image -- what's the proper way?
  2012-03-28  9:35       ` Robert P. J. Day
@ 2012-03-28 10:51         ` Marko Katić
  2012-03-28 10:57           ` Paul Eggleton
  0 siblings, 1 reply; 19+ messages in thread
From: Marko Katić @ 2012-03-28 10:51 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 1418 bytes --]

I always use "bitbake -c clean -c cleansstate package" for that purpose.

On Wed, Mar 28, 2012 at 11:35 AM, Robert P. J. Day <rpjday@crashcourse.ca>wrote:

> On Tue, 27 Mar 2012, Christopher Larson wrote:
>
> > I IMAGE_INSTALL_append or IMAGE_INSTALL_append_pn-core-image-minimal
> > or whatever when I need to quickly add a package temporarily,
> > myself.
>
>   once i add this package and build a new image to verify it was
> added, i want to revert and rebuild the original QEMU image again.  so
> after removing that line from local.conf, what's the bitbake clean
> incantation to remove all traces of sysfsutils from my build
> directory, so that i can rebuild the image with a simple
>
>  $ bitbake core-image-minimal
>
> thanks.
>
> rday
>
> --
>
> ========================================================================
> Robert P. J. Day                                 Ottawa, Ontario, CANADA
>                        http://crashcourse.ca
>
> Twitter:                                       http://twitter.com/rpjday
> LinkedIn:                               http://ca.linkedin.com/in/rpjday
> ========================================================================
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 2198 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: adding a single package to an image -- what's the proper way?
  2012-03-28 10:51         ` Marko Katić
@ 2012-03-28 10:57           ` Paul Eggleton
  2012-03-28 11:06             ` Robert P. J. Day
  0 siblings, 1 reply; 19+ messages in thread
From: Paul Eggleton @ 2012-03-28 10:57 UTC (permalink / raw)
  To: openembedded-core

On Wednesday 28 March 2012 12:51:46 Marko Katić wrote:
> I always use "bitbake -c clean -c cleansstate package" for that purpose.

Firstly, cleansstate does a clean already, so no need to specify that as well.

Secondly, images are always rebuilt so provided you comment out the 
IMAGE_INSTALL_append or whatever you have done to change the image contents, 
you can just build the image again and it will be rebuilt as it was before.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: adding a single package to an image -- what's the proper way?
  2012-03-28 10:57           ` Paul Eggleton
@ 2012-03-28 11:06             ` Robert P. J. Day
  2012-03-28 11:11               ` Paul Eggleton
  0 siblings, 1 reply; 19+ messages in thread
From: Robert P. J. Day @ 2012-03-28 11:06 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1797 bytes --]

On Wed, 28 Mar 2012, Paul Eggleton wrote:

> On Wednesday 28 March 2012 12:51:46 Marko Katić wrote:
> > I always use "bitbake -c clean -c cleansstate package" for that purpose.
>
> Firstly, cleansstate does a clean already, so no need to specify that as well.
>
> Secondly, images are always rebuilt so provided you comment out the
> IMAGE_INSTALL_append or whatever you have done to change the image
> contents, you can just build the image again and it will be rebuilt
> as it was before.

  i was testing the various solutions presented, and the first couple
worked just by changing the local.conf file (both adding and
removing), but the third using DISTRO_EXTRA_RDEPENDS didn't appear to
make a difference after i added the appropriate line to local.conf.

  if i add the line:

DISTRO_EXTRA_RDEPENDS += "sysfsutils"

do you know if this requires an explicit reconfiguration of some kind
to be picked up?  it's exactly these niggling details i'm trying to
clarify.

  oh, wait, a totally fresh build just finished with that line in my
local.conf, and that did *not* appear to add sysfsutils to my image,
so this section in the reference manual seems wrong:

http://www.yoctoproject.org/docs/current/poky-ref-manual/poky-ref-manual.html#usingpoky-extend-customimage-localconf

about to summarize all of this on my wiki page.

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] 19+ messages in thread

* Re: adding a single package to an image -- what's the proper way?
  2012-03-28 11:06             ` Robert P. J. Day
@ 2012-03-28 11:11               ` Paul Eggleton
  2012-03-28 11:14                 ` Robert P. J. Day
  0 siblings, 1 reply; 19+ messages in thread
From: Paul Eggleton @ 2012-03-28 11:11 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: openembedded-core

On Wednesday 28 March 2012 07:06:21 Robert P. J. Day wrote:
> On Wed, 28 Mar 2012, Paul Eggleton wrote:
> > On Wednesday 28 March 2012 12:51:46 Marko Katić wrote:
> > > I always use "bitbake -c clean -c cleansstate package" for that purpose.
> > 
> > Firstly, cleansstate does a clean already, so no need to specify that as
> > well.
> > 
> > Secondly, images are always rebuilt so provided you comment out the
> > IMAGE_INSTALL_append or whatever you have done to change the image
> > contents, you can just build the image again and it will be rebuilt
> > as it was before.
> 
>   i was testing the various solutions presented, and the first couple
> worked just by changing the local.conf file (both adding and
> removing), but the third using DISTRO_EXTRA_RDEPENDS didn't appear to
> make a difference after i added the appropriate line to local.conf.
> 
>   if i add the line:
> 
> DISTRO_EXTRA_RDEPENDS += "sysfsutils"
> 
> do you know if this requires an explicit reconfiguration of some kind
> to be picked up?  it's exactly these niggling details i'm trying to
> clarify.

Yes, it will. You would need to clean and rebuild task-base because unlike the 
other methods the dependency gets built into a task package.

This is one of the reasons you should not use DISTRO_EXTRA_RDEPENDS from 
local.conf - this is intended to be set from the distro configuration only. 
Please don't recommend this to be modified from local.conf - stick to 
CORE_IMAGE_EXTRA_INSTALL (or IMAGE_INSTALL_append, if you must).

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: adding a single package to an image -- what's the proper way?
  2012-03-28 11:11               ` Paul Eggleton
@ 2012-03-28 11:14                 ` Robert P. J. Day
  2012-03-28 11:22                   ` Paul Eggleton
  0 siblings, 1 reply; 19+ messages in thread
From: Robert P. J. Day @ 2012-03-28 11:14 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2332 bytes --]

On Wed, 28 Mar 2012, Paul Eggleton wrote:

> On Wednesday 28 March 2012 07:06:21 Robert P. J. Day wrote:
> > On Wed, 28 Mar 2012, Paul Eggleton wrote:
> > > On Wednesday 28 March 2012 12:51:46 Marko Katić wrote:
> > > > I always use "bitbake -c clean -c cleansstate package" for that purpose.
> > >
> > > Firstly, cleansstate does a clean already, so no need to specify that as
> > > well.
> > >
> > > Secondly, images are always rebuilt so provided you comment out the
> > > IMAGE_INSTALL_append or whatever you have done to change the image
> > > contents, you can just build the image again and it will be rebuilt
> > > as it was before.
> >
> >   i was testing the various solutions presented, and the first couple
> > worked just by changing the local.conf file (both adding and
> > removing), but the third using DISTRO_EXTRA_RDEPENDS didn't appear to
> > make a difference after i added the appropriate line to local.conf.
> >
> >   if i add the line:
> >
> > DISTRO_EXTRA_RDEPENDS += "sysfsutils"
> >
> > do you know if this requires an explicit reconfiguration of some kind
> > to be picked up?  it's exactly these niggling details i'm trying to
> > clarify.
>
> Yes, it will. You would need to clean and rebuild task-base because unlike the
> other methods the dependency gets built into a task package.
>
> This is one of the reasons you should not use DISTRO_EXTRA_RDEPENDS from
> local.conf - this is intended to be set from the distro configuration only.
> Please don't recommend this to be modified from local.conf - stick to
> CORE_IMAGE_EXTRA_INSTALL (or IMAGE_INSTALL_append, if you must).

  even though i realize this technique is not encouraged for
local.conf, as i mentioned, i just tested using it from scratch in a
brand new build and it still didn't add that package to my image.  if
it should have, then something isn't working.

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] 19+ messages in thread

* Re: adding a single package to an image -- what's the proper way?
  2012-03-28 11:14                 ` Robert P. J. Day
@ 2012-03-28 11:22                   ` Paul Eggleton
  2012-03-28 13:18                     ` Robert P. J. Day
  2012-03-28 13:19                     ` Andrea Adami
  0 siblings, 2 replies; 19+ messages in thread
From: Paul Eggleton @ 2012-03-28 11:22 UTC (permalink / raw)
  To: openembedded-core

On Wednesday 28 March 2012 07:14:41 Robert P. J. Day wrote:
>   even though i realize this technique is not encouraged for
> local.conf, as i mentioned, i just tested using it from scratch in a
> brand new build and it still didn't add that package to my image.  if
> it should have, then something isn't working.

So, there are two reasons why it might not work:

1) If you're using core-image-minimal, it will never be included using 
DISTRO_EXTRA_RDEPENDS (nor MACHINE_EXTRA_RDEPENDS, for that matter). This is 
because core-image-minimal does not include task-base - only the minimum 
required to get a working system.

2) Otherwise, if task-base has already been built and will be included (which 
it will be for any image that inherits from core-image and does not override 
IMAGE_INSTALL, e.g. core-image-sato) but you aren't using OEBasicHash 
(defaults to enabled for latest Poky, but not for OE-Core's default policy) 
then changing DISTRO_EXTRA_RDEPENDS after the fact won't do anything unless 
you force task-base to rebuild.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: adding a single package to an image -- what's the proper way?
  2012-03-28 11:22                   ` Paul Eggleton
@ 2012-03-28 13:18                     ` Robert P. J. Day
  2012-03-28 13:19                     ` Andrea Adami
  1 sibling, 0 replies; 19+ messages in thread
From: Robert P. J. Day @ 2012-03-28 13:18 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core

On Wed, 28 Mar 2012, Paul Eggleton wrote:

> On Wednesday 28 March 2012 07:14:41 Robert P. J. Day wrote:
> >   even though i realize this technique is not encouraged for
> > local.conf, as i mentioned, i just tested using it from scratch in a
> > brand new build and it still didn't add that package to my image.  if
> > it should have, then something isn't working.
>
> So, there are two reasons why it might not work:
>
> 1) If you're using core-image-minimal, it will never be included
> using DISTRO_EXTRA_RDEPENDS (nor MACHINE_EXTRA_RDEPENDS, for that
> matter). This is because core-image-minimal does not include
> task-base - only the minimum required to get a working system.

  ah, quite so, i didn't notice that, i'll try again with another
image just for verification.

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] 19+ messages in thread

* Re: adding a single package to an image -- what's the proper way?
  2012-03-28 11:22                   ` Paul Eggleton
  2012-03-28 13:18                     ` Robert P. J. Day
@ 2012-03-28 13:19                     ` Andrea Adami
  2012-03-28 18:55                       ` Paul Eggleton
  1 sibling, 1 reply; 19+ messages in thread
From: Andrea Adami @ 2012-03-28 13:19 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Wed, Mar 28, 2012 at 1:22 PM, Paul Eggleton
<paul.eggleton@linux.intel.com> wrote:
> On Wednesday 28 March 2012 07:14:41 Robert P. J. Day wrote:
>>   even though i realize this technique is not encouraged for
>> local.conf, as i mentioned, i just tested using it from scratch in a
>> brand new build and it still didn't add that package to my image.  if
>> it should have, then something isn't working.
>
> So, there are two reasons why it might not work:
>
> 1) If you're using core-image-minimal, it will never be included using

Robert, core-image-base is much better for testing (is a bit like
Angstrom console-image)

Paul,
maybe core-image-base (and core-image-core) should be listed in the
output of oe-init-build-env & co.?

Regards

Andrea

> DISTRO_EXTRA_RDEPENDS (nor MACHINE_EXTRA_RDEPENDS, for that matter). This is
> because core-image-minimal does not include task-base - only the minimum
> required to get a working system.
>
> 2) Otherwise, if task-base has already been built and will be included (which
> it will be for any image that inherits from core-image and does not override
> IMAGE_INSTALL, e.g. core-image-sato) but you aren't using OEBasicHash
> (defaults to enabled for latest Poky, but not for OE-Core's default policy)
> then changing DISTRO_EXTRA_RDEPENDS after the fact won't do anything unless
> you force task-base to rebuild.
>
> Cheers,
> Paul
>
> --
>
> Paul Eggleton
> Intel Open Source Technology Centre
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: adding a single package to an image -- what's the proper way?
  2012-03-27 12:20 adding a single package to an image -- what's the proper way? Robert P. J. Day
  2012-03-27 12:56 ` Marko Katić
  2012-03-27 19:27 ` Paul Eggleton
@ 2012-03-28 13:48 ` Koen Kooi
  2012-03-28 13:50   ` Robert P. J. Day
  2 siblings, 1 reply; 19+ messages in thread
From: Koen Kooi @ 2012-03-28 13:48 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer


Op 27 mrt. 2012, om 05:20 heeft Robert P. J. Day het volgende geschreven:

> 
>  i'm currently poring over the OE docs (including the ones at the
> yocto site), and i'm trying to figure out how to simply add a package
> to an image through one's local.conf file.

Why throught local.conf. Image recipes are really small and easy to understand. Just make a copy of the recipe you want to change and change that, no need to go poke at it from non obvious places.
I really don't understand why people are so against creating their own image recipe since foo-image.bb is not really foo-image anymore if you add 'bar' to it thru e.g. local.conf.






^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: adding a single package to an image -- what's the proper way?
  2012-03-28 13:48 ` Koen Kooi
@ 2012-03-28 13:50   ` Robert P. J. Day
  0 siblings, 0 replies; 19+ messages in thread
From: Robert P. J. Day @ 2012-03-28 13:50 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Wed, 28 Mar 2012, Koen Kooi wrote:

>
> Op 27 mrt. 2012, om 05:20 heeft Robert P. J. Day het volgende geschreven:
>
> >
> >  i'm currently poring over the OE docs (including the ones at the
> > yocto site), and i'm trying to figure out how to simply add a package
> > to an image through one's local.conf file.
>
> Why throught local.conf. Image recipes are really small and easy to
> understand. Just make a copy of the recipe you want to change and
> change that, no need to go poke at it from non obvious places. I
> really don't understand why people are so against creating their own
> image recipe since foo-image.bb is not really foo-image anymore if
> you add 'bar' to it thru e.g. local.conf.

  actually, i have no problem with that, as long as the same
philosophy holds in the official OE/yocto docs.  but if the docs
themselves explain how to do it through local.conf, then it should be
supported.

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] 19+ messages in thread

* Re: adding a single package to an image -- what's the proper way?
  2012-03-28 13:19                     ` Andrea Adami
@ 2012-03-28 18:55                       ` Paul Eggleton
  0 siblings, 0 replies; 19+ messages in thread
From: Paul Eggleton @ 2012-03-28 18:55 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Wednesday 28 March 2012 15:19:20 Andrea Adami wrote:
> Robert, core-image-base is much better for testing (is a bit like
> Angstrom console-image)
> 
> Paul,
> maybe core-image-base (and core-image-core) should be listed in the
> output of oe-init-build-env & co.?

Possibly. In the next development cycle though I would like to do a rework of 
the images and tasks so that they are better named and particularly in the 
case of tasks, more effective.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2012-03-28 19:04 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-27 12:20 adding a single package to an image -- what's the proper way? Robert P. J. Day
2012-03-27 12:56 ` Marko Katić
2012-03-27 19:12   ` Robert P. J. Day
2012-03-27 19:27 ` Paul Eggleton
2012-03-28  2:42   ` Denys Dmytriyenko
2012-03-28  3:08     ` Christopher Larson
2012-03-28  9:32       ` Robert P. J. Day
2012-03-28  9:35       ` Robert P. J. Day
2012-03-28 10:51         ` Marko Katić
2012-03-28 10:57           ` Paul Eggleton
2012-03-28 11:06             ` Robert P. J. Day
2012-03-28 11:11               ` Paul Eggleton
2012-03-28 11:14                 ` Robert P. J. Day
2012-03-28 11:22                   ` Paul Eggleton
2012-03-28 13:18                     ` Robert P. J. Day
2012-03-28 13:19                     ` Andrea Adami
2012-03-28 18:55                       ` Paul Eggleton
2012-03-28 13:48 ` Koen Kooi
2012-03-28 13:50   ` 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.