Bug 5321 - When DISTRO_FEATURES are removed, bitbake world should still work
Summary: When DISTRO_FEATURES are removed, bitbake world should still work
Status: RESOLVED WORKSFORME
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: configuration (show other bugs)
Version: 1.6
Hardware: Other Multiple
: Medium enhancement
Target Milestone: 2.1
Assignee: Randy MacLeod
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-10-04 20:54 UTC by Randy MacLeod
Modified: 2015-10-29 14:23 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments
Allow-the-removal-of-the-opengl-DISTRO_FEATURE.patch (14.72 KB, patch)
2013-10-04 20:54 UTC, Randy MacLeod
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Randy MacLeod 2013-10-04 20:54:46 UTC
Created attachment 1551 [details]
Allow-the-removal-of-the-opengl-DISTRO_FEATURE.patch

If the DISTRO_FEATURES in conf/local.conf do not include opengl (or x11 or ...)
then:
$ bitbake world 
will fail with:
    Missing or unbuildable dependency chain was: ['clutter-gtk-1.0', 'clutter-1.0', 'virtual/libgl'] 

We need rules around the essential DISTRO_FEATURES and fixes for all recipes
along the lines of:

-inherit autotools pkgconfig
+inherit autotools pkgconfig distro_features_check
+REQUIRED_DISTRO_FEATURES = "opengl"

to allow bitbake world to succeed.

My DFs used to do this test:
DISTRO_FEATURES = "alsa argp bluetooth ext2 irda largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11"


I have made progress on fixing the world build when opengl is removed:
$ git diff  | diffstat
 recipes-core/packagegroups/packagegroup-core-tools-testapps.bb |    2 
 recipes-core/packagegroups/packagegroup-self-hosted.bb         |   14 ---
 recipes-extended/packagegroups/packagegroup-core-lsb.bb        |   41 ----------
 recipes-graphics/clutter/clutter-1.0.inc                       |    3 
 recipes-graphics/clutter/clutter-gst-1.0_1.6.0.bb              |    4 
 recipes-graphics/clutter/clutter-gtk-1.0.inc                   |    6 -
 recipes-graphics/cogl/cogl-1.0.inc                             |    3 
 recipes-graphics/eglinfo/eglinfo.inc                           |    6 -
 recipes-graphics/glew/glew_1.10.0.bb                           |    3 
 recipes-graphics/mesa/libglu_9.0.0.bb                          |    3 
 recipes-graphics/mesa/mesa-demos_8.1.0.bb                      |    3 
 recipes-graphics/mx/mx-1.0_1.4.7.bb                            |    1 
 recipes-graphics/mx/mx.inc                                     |    4 
 recipes-graphics/packagegroups/packagegroup-core-clutter.bb    |    3 
 recipes-graphics/wayland/weston_1.1.0.bb                       |    3 
 recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bb          |    3 
 recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc      |    4 
 recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.0.9.bb |    3 
 recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb   |    3 
 recipes-qt/qt4/qt-mobility-x11_1.2.0.bb                        |    1 
 recipes-qt/qt4/qt4-x11-free.inc                                |    4 
 21 files changed, 42 insertions(+), 75 deletions(-)

see attached.
Comment 1 Randy MacLeod 2013-10-04 20:57:32 UTC
A little more from my email to oe-core:

This looks better now, here's a summary of the change:

meta/recipes-graphics/mesa/libglu_9.0.0.bb
...
-inherit autotools pkgconfig
+inherit autotools pkgconfig distro_features_check
+REQUIRED_DISTRO_FEATURES = "opengl"

and adding additional features is easy too.

I stuck with this syntax and fixed all the recipes when 
they failed at initial parse time. That left a few packagegroups
to be fixed and I ended up with:

 recipes-core/.../packagegroup-core-tools-testapps.bb |    2 
 recipes-core/.../packagegroup-self-hosted.bb         |   14 ---
 recipes-extended/.../packagegroup-core-lsb.bb        |   41 ----------
 recipes-graphics/.../packagegroup-core-clutter.bb    |    3 

The summary of the pkggrp changes is some simple changes:

meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb
...
-inherit packagegroup
+inherit packagegroup distro_features_check
+REQUIRED_DISTRO_FEATURES = "opengl"

and some refactoring of packagegroups to ensure that the 
graphical part of lsb and self-hosted could be easily disabled.
Comment 2 Randy MacLeod 2014-02-27 22:41:42 UTC
This is a nice to have enhancement but I won't have time to work on it in this release cycle. Changed target to 1.7.
Comment 3 Randy MacLeod 2014-11-18 00:37:42 UTC
2 weeks would be a good start to get some of the basic graphics DISTRO_FEATURES properly supported. Full support for arbitrary combinations of DFs would be much longer.
Comment 4 Randy MacLeod 2014-12-08 18:36:13 UTC
update from weeks to days
Comment 5 Randy MacLeod 2015-02-17 20:57:16 UTC
Not a priority for 1.8 so moved to 1.9. This should also be worked on early in the release.
Comment 6 Randy MacLeod 2015-10-29 14:23:31 UTC
Adding or dropping the distro features: "x11 opengl" as a pair works now so I'm closing this defect. I think it's unlikely that adding or dropping individual DISTRO_FEATURES can be made to work and supported properly.