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

Otavio Salvador otavio at ossystems.com.br
Tue Jul 30 12:00:28 UTC 2013


On Tue, Jul 30, 2013 at 7:59 AM, Paul Eggleton
<paul.eggleton at linux.intel.com> wrote:
> On Monday 29 July 2013 19:26:27 Otavio Salvador wrote:
>> This allow the addition and removal of distro features easily. To add
>> a feature, use:
>>
>>  EXTRA_DISTRO_FEATURES += "wayland"
>>
>> and to remove, use '~' prefix, as:
>>
>>  EXTRA_DISTRO_FEATURES += "~x11"
>>
>> This code has been mostly copied from Mentor Graphics public layer but
>> changed the variable name for a more descriptive name.
>
> 1) Isn't this just adding list subtraction via the back door, which Richard
> has already argued against (mostly because the interaction between it and
> _append/_prepend will be hard to predict)?

We call it and /finalize/ the database so it has _append/_prepend
resolved before mangling the list.

> 2) Why not just set DISTRO_FEATURES to contain just the items you want in your
> distro configuration instead of trying to add and subtract from some previous
> value? What if the previous value changes in a way that no longer fits your
> desired configuration? Surely it is better to just be explicit.

To make this, we cannot reuse Poky distro for example as it
/unconditionally/ appends to DISTRO_FEATURES. Besides it is easier for
test to be able to override it using local.conf. For products I agree
we'll end adding a distro to make it reprodicable but for development
stage this trick makes life much easier.

> 3) Even if we were to add this here wouldn't users expect this to work in all
> such variables and not just DISTRO_FEATURES?

I did this for DISTRO_FEATURES and I don't think it is good to have
this for all vars.

--
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



More information about the Openembedded-core mailing list