<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 28, 2013 at 12:21 PM, Eric Bénard <span dir="ltr"><<a href="mailto:eric@eukrea.com" target="_blank">eric@eukrea.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Otavio,<br>
<br>
Le Tue, 28 May 2013 12:18:21 -0300,<br>
Otavio Salvador <<a href="mailto:otavio@ossystems.com.br">otavio@ossystems.com.br</a>> a écrit :<br>
<div class="im"><br>
> On Tue, May 28, 2013 at 12:12 PM, Phil Blundell <<a href="mailto:pb@pbcl.net">pb@pbcl.net</a>> wrote:<br>
</div><div class="im">> > Also also, we've managed without this functionality in oe-core for some<br>
> > time which makes me wonder how widely useful it would actually be. If<br>
> > it's only going to be used by a few recipes then it could go in a class,<br>
> > or in in the recipes themselves, rather than adding parse time and<br>
> > memory footprint to every recipe.<br>
> ><br>
><br>
> Right; let's first agree in the code so we can discuss where to put it:<br>
><br>
> + need_distro_features = d.getVar('REQUIRED_DISTRO_FEATURES', True)<br>
> + if need_distro_features:<br>
> + need_distro_features = need_distro_features.split()<br>
> + distro_features = (d.getVar('DISTRO_FEATURES', True) or<br>
> "").split()<br>
> + for f in need_distro_features:<br>
> + if f in distro_features:<br>
> + break<br>
> + else:<br>
> + raise bb.parse.SkipPackage("missing required distro<br>
> feature %s (not in DISTRO_FEATURES)" % need_distro_features)<br>
><br>
><br>
</div>If I follow you want that to avoid this line in a recipe :<br>
COMPATIBLE_MACHINE = "{@base_contains('DISTRO_FEATURES', 'x11', (mx5),<br>
'', d)}"<br>
maybe there is a more clean way to exclude this recipe when x11<br>
is not present without impacting the whole build system ?<br></blockquote><div><br></div><div style>This is one place it'd be used. Wayland support is another.</div><div style><br></div><div style>It can be placed in a class, no problem ... I just want people to agree in the code so I can send a v2. </div>
</div><div><br></div>-- <br>Otavio Salvador O.S. Systems<br><a href="http://www.ossystems.com.br" target="_blank">http://www.ossystems.com.br</a> <a href="http://projetos.ossystems.com.br" target="_blank">http://projetos.ossystems.com.br</a><br>
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750<br>
</div></div>