Re: [PATCH 1/2] bitbake.conf: DISTRO_FEATURES as overrides

Peter Kjellerstedt
2017-06-08T13:16:42Z

> -----Original Message-----
> From: Richard Purdie [mailto:richard.purdie@linuxfoundation.org]
> Sent: den 8 juni 2017 12:45
> To: Patrick Ohly <patrick.ohly@intel.com>; Peter Kjellerstedt
> <peter.kjellerstedt@axis.com>
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH 1/2] bitbake.conf: DISTRO_FEATURES as
> overrides
>
> On Thu, 2017-06-08 at 08:04 +0200, Patrick Ohly wrote:
> > On Wed, 2017-06-07 at 16:11 +0000, Peter Kjellerstedt wrote:
> > >
> > > Rather than requiring that the wanted DISTRO_FEATURES that should
> > > be
> > > available as overrides are defined in DISTRO_FEATURES_OVERRIDES
> > > (which
> > > should not be confused with the similarly named
> > > DISTROFEATURESOVERRIDES
> > > variable that you also add...),
> > I had thought about those names and in the end went ahead with the
> > similar names because the customizable one made sense to me and the
> > internal one is similar to the other entries in OVERRIDES.
> >
> > >
> > >  why not add them all but with a prefix.
> > > I.e., similar to how package names are available as overrides
> > > prefixed
> > > with "pn-", how about all distro features are made available as
> > > overrides with a "df-" prefix?
> > That would be fine with me.
> >
> > I just have a few concerns:
> >       * How performance-sensitive is OVERRIDES? How can the impact of
> >         both approaches be benchmarked? The idea behind the
> > configurable
> >         subset was to add only a few new overrides. We currently have
> >         almost 70 individual entries in DISTRO_FEATURES.
> >       * I've seen confusion about the pn- prefix. At least df- would
> > be
> >         named appropriately (in contrast to PN, which is historic),
> > but
> >         it's yet another convention that might not be immediately
> >         obvious. The same is true for selecting a subset with the
> > same
> >         name as the feature, though.
> >       * Can distro features contain characters that are invalid in an
> >         override? _ and : would have to be avoided, for example by
> >         mapping them to -.
>
> My feelings are:
>
> * We need to use a prefix. We've been burnt too many times in the past
>   when not using these. "df-" is fine, users will just have to deal
>   with it.
>
> * We should filter the list of overrides to those which the distro
>   wants to nominate. I really don't want to encourage wider spread of
>   things than we need to, these need to be conscious decisions.

Isn't there a risk that will be confusing? I.e., recipes that use, e.g.,
bb.utils.contains() to check if a distro feature is set will be affected
as soon as the feature is added to DISTRO_FEATURES, but recipes that
use the override will only be affected if the feature has also been
added to some filter variable.

> Cheers,
>
> Richard

//Peter