[oe] [meta-oe][PATCH 1/3] gtkwave: add distro_features_check

Martin Jansa martin.jansa at gmail.com
Thu May 16 11:46:00 UTC 2019


On Thu, May 16, 2019 at 10:21:14AM +0200, Andreas Müller wrote:
> On Thu, May 16, 2019 at 9:25 AM Adrian Bunk <bunk at stusta.de> wrote:
> >
> > On Thu, May 16, 2019 at 07:06:22AM +0000, Martin Jansa wrote:
> > > * fixes:
> > > ERROR: Nothing PROVIDES 'gtk+' (but /OE/build/luneos-warrior/webos-ports/meta-openembedded/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.98.bb DEPENDS on or otherwise requires it)
> > > gtk+ was skipped: one of 'x11 directfb' needs to be in DISTRO_FEATURES
> > > ERROR: Required build target 'meta-world-pkgdata' has no buildable providers.
> > > Missing or unbuildable dependency chain was: ['meta-world-pkgdata', 'gtkwave', 'gtk+']
> > >
> > > and
> > >
> > > ERROR: Nothing PROVIDES 'tk' (but /OE/build/luneos-warrior/webos-ports/meta-openembedded/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.98.bb DEPENDS on or otherwise requires it)
> > > tk was skipped: missing required distro feature 'x11' (not in DISTRO_FEATURES)
> > > ERROR: Required build target 'meta-world-pkgdata' has no buildable providers.
> > > Missing or unbuildable dependency chain was: ['meta-world-pkgdata', 'gtkwave', 'tk']
> > >
> > > Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
> > > ---
> > >  meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.98.bb | 4 ++++
> > >  1 file changed, 4 insertions(+)
> > >
> > > diff --git a/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.98.bb b/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.98.bb
> > > index 60df6f773b..b9aae0f6c8 100644
> > > --- a/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.98.bb
> > > +++ b/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.98.bb
> > > @@ -14,6 +14,10 @@ inherit pkgconfig autotools gettext texinfo
> > >  DEPENDS = "tcl tk gperf-native bzip2 xz pango zlib gtk+ gdk-pixbuf glib-2.0"
> > >  RDEPENDS_${PN} = "tk-lib"
> > >
> > > +# depends on gtk+ which has this restriction
> > > +inherit distro_features_check
> > > +ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
> > >...
> >
> > Shouldn't this be x11 (without the directfb alternative)
> > due to tk?
> >
> It is slightly off-top and maybe I missed something but from my
> opinion these type of patches are wrong - and we have many of them.
> The origin of the issue is gtk+ not gtkwave.

I think this was discussed (long time ago) when adding x11 to required
distro features to all recipes depending on libx11, but I haven't found
that thread with quick search.

You're right that the gtk+ restriction is the root cause of this, but
gtk+ already has the restriction correct defined (hence the "gtk+ was
skipped: one of 'x11 directfb' needs to be in DISTRO_FEATURES" error
message when parsing gtkwave).

The automatic propagation of such restriction to recipes which depend on
it sounds good, but it also makes sense to explicitly acknowledge that
there is such restriction caused by some dependency in the recipe.
That's why I'm at least putting a comment above REQUIRED_DISTRO_FEATURES
saying why I've added it in first place.

In most cases I just want to be able to do:
bitbake world without any errors shown for MACHINEs which I care about
or something like:
openembedded-core/scripts/sstate-diff-machines.sh --targets=world --tmpdir=tmp-glibc/ --analyze --machines="hammerhead mako qemux86"
which works correctly only if it can parse the dependency tree of whole
world.

> Would it be a big issue if recipes inherit distro-feature-check
> settings from the recipes they depend on?
> 
> I ask this because this is definitely a maintenance burden and such a
> mechanism would make life much easier.

Agreed, especially in cases where the problematic dependency is also
optional and the required distro features should be set with respect to
e.g. PACKAGECONFIG as well.

But me being used to a lot of burden I don't see this type of
patches to be so big deal.

Just compare:
https://github.com/openwebos/meta-webos/blob/master/conf/distro/include/webos-recipe-blacklist-world.inc
https://github.com/webosose/meta-webosose/blob/master/meta-webos/conf/distro/include/webos-recipe-blacklist-world.inc
https://github.com/webOS-ports/meta-webos-ports/blob/master/meta-luneos/conf/distro/include/luneos-recipe-blacklist-world.inc

just having the distro-feature-check bbclass and the restriction in the
recipes (instead of PNBLACKLIST for all recipes incompatible with the
DISTRO_FEATURES we have) made my life so much easier (that I never got
around to cleanup some of these 6+ old entries which were already
resolved elsewhere since then).

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20190516/af82e85d/attachment-0001.sig>


More information about the Openembedded-devel mailing list