[OE-core] adding a single package to an image -- what's the proper way?

Denys Dmytriyenko denis at denix.org
Wed Mar 28 02:42:04 UTC 2012


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




More information about the Openembedded-core mailing list