[OE-core] [PATCH] base.bbclass: Add COMPATIBLE_DISTRO_FEATURES support

Otavio Salvador otavio at ossystems.com.br
Tue May 28 15:26:03 UTC 2013


On Tue, May 28, 2013 at 12:21 PM, Eric Bénard <eric at eukrea.com> wrote:

> Hi Otavio,
>
> Le Tue, 28 May 2013 12:18:21 -0300,
> Otavio Salvador <otavio at ossystems.com.br> a écrit :
>
> > On Tue, May 28, 2013 at 12:12 PM, Phil Blundell <pb at pbcl.net> wrote:
> > > Also also, we've managed without this functionality in oe-core for some
> > > time which makes me wonder how widely useful it would actually be.  If
> > > it's only going to be used by a few recipes then it could go in a
> class,
> > > or in in the recipes themselves, rather than adding parse time and
> > > memory footprint to every recipe.
> > >
> >
> > Right; let's first agree in the code so we can discuss where to put it:
> >
> > +        need_distro_features = d.getVar('REQUIRED_DISTRO_FEATURES',
> True)
> > +        if need_distro_features:
> > +            need_distro_features = need_distro_features.split()
> > +            distro_features = (d.getVar('DISTRO_FEATURES', True) or
> > "").split()
> > +            for f in need_distro_features:
> > +                if f in distro_features:
> > +                    break
> > +            else:
> > +                raise bb.parse.SkipPackage("missing required distro
> > feature %s (not in DISTRO_FEATURES)" % need_distro_features)
> >
> >
> If I follow you want that to avoid this line in a recipe :
> COMPATIBLE_MACHINE = "{@base_contains('DISTRO_FEATURES', 'x11', (mx5),
> '', d)}"
> maybe there is a more clean way to exclude this recipe when x11
> is not present without impacting the whole build system ?
>

This is one place it'd be used. Wayland support is another.

It can be placed in a class, no problem ... I just want people to agree in
the code so I  can send a v2.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20130528/ac42cfe7/attachment-0002.html>


More information about the Openembedded-core mailing list