[OE-core] DISTRO_FEATURES and world builds.

Randy MacLeod randy.macleod at windriver.com
Fri Oct 4 04:28:53 UTC 2013


On 13-10-03 10:15 PM, Randy MacLeod wrote:
>
> Some world builds without the DFs: x11 or opengl fail unless
> I run: bitbake -k world. Ideally packages would exclude themselves
> from world builds if a required DF isn't set. Otherwise identifying
> broken packages in bb world builds is not straight-forward. I can
> add the DFs in to my world test builds but then I'm not really
> exercising at least some of the recipes properly.
>
> So....
> What are the rules around DISTRO_FEATURES and bitbake world builds?
> What testing has been done and which if any DFs are mandatory.
>
>
> I copied the default DFs from
> meta/conf/distro/include/default-distrovars.inc:
> DISTRO_FEATURES_DEFAULT ?= \
> "alsa argp bluetooth ext2 irda largefile pcmcia usbgadget \
>   usbhost wifi xattr nfs zeroconf pci 3g nfc x11"
>
> into my conf/local.conf file as:
> DISTRO_FEATURES = \
> "alsa argp bluetooth ext2 irda largefile pcmcia usbgadget \
> usbhost wifi xattr nfs zeroconf pci 3g nfc x11"
>
> and I if I do a bitbake world it fails with:
>
>
> NOTE: Resolving any missing task queue dependencies
> ERROR: Nothing PROVIDES 'virtual/libgl' (but
> /home/rmacleod/src/distro/oe/oe-core.git/meta/recipes-graphics/clutter/clutter-1.0_1.14.4.bb,
> /home/rmacleod/src/distro/oe/oe-core.git/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb,
> /home/rmacleod/src/distro/oe/oe-core.git/meta/recipes-graphics/glew/glew_1.10.0.bb,
> /home/rmacleod/src/distro/oe/oe-core.git/meta/recipes-qt/qt4/qt4-x11-free_4.8.5.bb,
> /home/rmacleod/src/distro/oe/oe-core.git/meta/recipes-graphics/mesa/libglu_9.0.0.bb,
> /home/rmacleod/src/distro/oe/oe-core.git/meta/recipes-graphics/cogl/cogl-1.0_1.14.0.bb
> DEPENDS on or otherwise requires it)
> ERROR: mesa PROVIDES virtual/libgl but was skipped: missing required
> distro feature ['opengl'] (not in DISTRO_FEATURES)
> ERROR: mesa-gl PROVIDES virtual/libgl but was skipped: missing required
> distro feature ['opengl'] (not in DISTRO_FEATURES)
> ERROR: mesa PROVIDES virtual/libgl but was skipped: missing required
> distro feature ['opengl'] (not in DISTRO_FEATURES)
> ERROR: Required build target 'clutter-gtk-1.0' has no buildable providers.
> Missing or unbuildable dependency chain was: ['clutter-gtk-1.0',
> 'clutter-1.0', 'virtual/libgl']
>
>
>
> If I drop x11 from the DF list things are even worse.
>
> I tried to sprinkle these recipes with:
>     REQUIRED_DISTRO_FEATURES = "opengl"
> but just as I thought, that didn't work either.
>


I found similar example:
$ cat meta/recipes-core/udev/udev.inc
...
# As systemd also builds udev,
# skip this package if we're doing a systemd build.
python () {
     if oe.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
         raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES")
}

and adding that to all the recipes that depend on opengl/egl
*did* fix the bitbake world problem but now I'm stuck on:

NOTE: Resolving any missing task queue dependencies
ERROR: Nothing RPROVIDES 'clutter-1.0' (but 
/home/rmacleod/src/distro/oe/oe-core.git/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb 
RDEPENDS on or otherwise requires it)
ERROR: clutter-1.0 was skipped: 'opengl' in DISTRO_FEATURES
NOTE: Runtime target 'clutter-1.0' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['clutter-1.0']
ERROR: Required build target 'packagegroup-core-clutter' has no 
buildable providers.
Missing or unbuildable dependency chain was: 
['packagegroup-core-clutter', 'clutter-1.0']

and it's late. I'll attach (yes sorry it's not inline) what
I have so far, it's pure bulldozing work so it's only useful if
someone wants to pick up where I've left off and review what I've
done so far more carefully.


( grep -r -B 1 SkipPackage meta/recipes* for a list)


Here's an example patch of what I'm trying:

diff --git a/meta/recipes-graphics/clutter/clutter-1.0.inc 
b/meta/recipes-graphics/clutter/clutter-1.0.inc
index 1356586..0cdaadf 100644
--- a/meta/recipes-graphics/clutter/clutter-1.0.inc
+++ b/meta/recipes-graphics/clutter/clutter-1.0.inc
@@ -2,6 +2,11 @@ DESCRIPTION = "Clutter graphics library"
  HOMEPAGE = "http://www.clutter-project.org/"
  LICENSE = "LGPLv2.1+"

+python () {
+    if not oe.utils.contains ('DISTRO_FEATURES', 'opengl', \
                  True, False, d):
+        raise bb.parse.SkipPackage("'opengl' in DISTRO_FEATURES")
+}
+
  inherit clutter
...


Should I flip the True, False around and drop the "not" ?

This whole approach feels wrong and hopefully we can solve it
in a less brute-force manner. Doing this for x11 will be madness.

-- 
# Randy MacLeod. SMTS, Linux, Wind River
Direct: 613.963.1350
-------------- next part --------------
A non-text attachment was scrubbed...
Name: does-not-contain-opengl-distro-flag.patch
Type: text/x-patch
Size: 9789 bytes
Desc: not available
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20131004/90340d29/attachment-0002.bin>


More information about the Openembedded-core mailing list