[yocto] [Yocto] Enable a recipe/package only when other dependent recipe/package is part of image.

Burton, Ross ross.burton at intel.com
Mon Apr 25 04:46:54 PDT 2016


On 25 April 2016 at 07:46, Amarnath Valluri <amarnath.valluri at intel.com>
wrote:

> I would like to provide a pakcagegroup-config, that should automatically
> select the configuration packages that are part of image configuration. Say
> if ‘connman’ is part of image then it should add ‘connman-conf’ to its
> RDEPENDS_${PN}.
>
>
You can't do that.

A packagegroup is just a recipe that generates packages with no contents,
just dependencies.  They are built once and don't know what image they're
being "built for", or what other packages are being built.  What would you
packagegroup do if it were built directly, not via dependencies from an
image?

The low-fi way to implement this would be for the layer that adds
connman-conf to also add a bbappend for connman to depend on connman-conf.

An alternative would be to have some naming pattern for conf packages
(-conf is reasonable) and invent a new image-feature called conf-packages
that uses a glob to find all complementary packages matching the *-conf
pattern.  This is how dev-pkgs, dbg-pkgs, doc-pkgs etc work.  I believe
this is just a matter of setting COMPLEMENTARY_GLOB[conf-pkgs] = '*-conf'
in your configuration.

Ross
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20160425/8d198f39/attachment.html>


More information about the yocto mailing list