[OE-core] [PATCH] base.bbclass: Add COMPATIBLE_DISTRO_FEATURES support
Eric Bénard
eric at eukrea.com
Tue May 28 15:21:35 UTC 2013
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 ?
Eric
More information about the Openembedded-core
mailing list