Patchwork bitbake.conf: Default DISTRO to nodistro

login
register
mail settings
Submitter Richard Purdie
Date Nov. 7, 2013, 11:18 p.m.
Message ID <1383866326.6271.286.camel@ted>
Download mbox | patch
Permalink /patch/61295/
State New
Headers show

Comments

Richard Purdie - Nov. 7, 2013, 11:18 p.m.
An empty distro value leads to OVERRIDES and FILESOVERRIDES containing
"::" entries which causes odd issues such as files being included when
they shouldn't be. We could put in anonymous python to guard against
empty entries but its messy and setting a default value for DISTRO to
something harmless is much easier.

This patch adds a weak default and ensures the sanity test doesn't
complain about it.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
Ross Burton - Nov. 8, 2013, 9:25 a.m.
On 7 November 2013 23:18, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> +DISTRO ??= "nodistro"

Wouldn't "oe-core" be a better name, considering that's what
DISTROVERSION becomes if DISTRO is unset?

Ross
Andrea Adami - Nov. 8, 2013, 9:33 a.m.
On Fri, Nov 8, 2013 at 10:25 AM, Burton, Ross <ross.burton@intel.com> wrote:
> On 7 November 2013 23:18, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
>> +DISTRO ??= "nodistro"
>
> Wouldn't "oe-core" be a better name, considering that's what
> DISTROVERSION becomes if DISTRO is unset?
>
> Ross


Agreed, we already have DISTRO_VERSION = "oe-core.0"
This sounds also the right name for THE default distro.

My 2 cents

Andrea


> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Richard Purdie - Nov. 8, 2013, 9:47 a.m.
On Fri, 2013-11-08 at 10:33 +0100, Andrea Adami wrote:
> On Fri, Nov 8, 2013 at 10:25 AM, Burton, Ross <ross.burton@intel.com> wrote:
> > On 7 November 2013 23:18, Richard Purdie
> > <richard.purdie@linuxfoundation.org> wrote:
> >> +DISTRO ??= "nodistro"
> >
> > Wouldn't "oe-core" be a better name, considering that's what
> > DISTROVERSION becomes if DISTRO is unset?
> >
> > Ross
> 
> 
> Agreed, we already have DISTRO_VERSION = "oe-core.0"
> This sounds also the right name for THE default distro.

I disagree and I feel quite strongly about this. OE-Core is not a
distro. The whole idea was that OE-Core should build with sane defaults
without any distro set. This is a dummy placeholder value and it really
does mean to say that no distro is set.

We did put a value into the DISTRO_VERSION field so you could tell what
was being used but again its a placeholder.

So in my view "nodistro" is clearer about what is meant.

Cheers,

Richard
Martin Jansa - Nov. 8, 2013, 11:23 a.m.
I don't feel strongly about this, but I have heard people say "distroless"
and I'm using the same when refering to default oe-core setup.


On Fri, Nov 8, 2013 at 10:47 AM, Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:

> On Fri, 2013-11-08 at 10:33 +0100, Andrea Adami wrote:
> > On Fri, Nov 8, 2013 at 10:25 AM, Burton, Ross <ross.burton@intel.com>
> wrote:
> > > On 7 November 2013 23:18, Richard Purdie
> > > <richard.purdie@linuxfoundation.org> wrote:
> > >> +DISTRO ??= "nodistro"
> > >
> > > Wouldn't "oe-core" be a better name, considering that's what
> > > DISTROVERSION becomes if DISTRO is unset?
> > >
> > > Ross
> >
> >
> > Agreed, we already have DISTRO_VERSION = "oe-core.0"
> > This sounds also the right name for THE default distro.
>
> I disagree and I feel quite strongly about this. OE-Core is not a
> distro. The whole idea was that OE-Core should build with sane defaults
> without any distro set. This is a dummy placeholder value and it really
> does mean to say that no distro is set.
>
> We did put a value into the DISTRO_VERSION field so you could tell what
> was being used but again its a placeholder.
>
> So in my view "nodistro" is clearer about what is meant.
>
> Cheers,
>
> Richard
>
>
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
Otavio Salvador - Nov. 8, 2013, 11:58 a.m.
On Fri, Nov 8, 2013 at 7:47 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Fri, 2013-11-08 at 10:33 +0100, Andrea Adami wrote:
>> On Fri, Nov 8, 2013 at 10:25 AM, Burton, Ross <ross.burton@intel.com> wrote:
>> > On 7 November 2013 23:18, Richard Purdie
>> > <richard.purdie@linuxfoundation.org> wrote:
>> >> +DISTRO ??= "nodistro"
>> >
>> > Wouldn't "oe-core" be a better name, considering that's what
>> > DISTROVERSION becomes if DISTRO is unset?
>> >
>> > Ross
>>
>>
>> Agreed, we already have DISTRO_VERSION = "oe-core.0"
>> This sounds also the right name for THE default distro.
>
> I disagree and I feel quite strongly about this. OE-Core is not a
> distro. The whole idea was that OE-Core should build with sane defaults
> without any distro set. This is a dummy placeholder value and it really
> does mean to say that no distro is set.
>
> We did put a value into the DISTRO_VERSION field so you could tell what
> was being used but again its a placeholder.
>
> So in my view "nodistro" is clearer about what is meant.

So we should drop DISTRO_VERSION or use 'no-distro.0'
Mark Hatle - Nov. 8, 2013, 3:33 p.m.
On 11/8/13, 3:47 AM, Richard Purdie wrote:
> On Fri, 2013-11-08 at 10:33 +0100, Andrea Adami wrote:
>> On Fri, Nov 8, 2013 at 10:25 AM, Burton, Ross <ross.burton@intel.com> wrote:
>>> On 7 November 2013 23:18, Richard Purdie
>>> <richard.purdie@linuxfoundation.org> wrote:
>>>> +DISTRO ??= "nodistro"
>>>
>>> Wouldn't "oe-core" be a better name, considering that's what
>>> DISTROVERSION becomes if DISTRO is unset?
>>>
>>> Ross
>>
>>
>> Agreed, we already have DISTRO_VERSION = "oe-core.0"
>> This sounds also the right name for THE default distro.
>
> I disagree and I feel quite strongly about this. OE-Core is not a
> distro. The whole idea was that OE-Core should build with sane defaults
> without any distro set. This is a dummy placeholder value and it really
> does mean to say that no distro is set.
>
> We did put a value into the DISTRO_VERSION field so you could tell what
> was being used but again its a placeholder.
>
> So in my view "nodistro" is clearer about what is meant.

I agree as well.  The thought back when this started was -if- there was to be an 
OE distribution, it could come from a component of meta-openembedded.

--Mark

> Cheers,
>
> Richard
>
>
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
Khem Raj - Nov. 8, 2013, 4:28 p.m.
On Fri, Nov 8, 2013 at 1:47 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Fri, 2013-11-08 at 10:33 +0100, Andrea Adami wrote:
>> On Fri, Nov 8, 2013 at 10:25 AM, Burton, Ross <ross.burton@intel.com> wrote:
>> > On 7 November 2013 23:18, Richard Purdie
>> > <richard.purdie@linuxfoundation.org> wrote:
>> >> +DISTRO ??= "nodistro"
>> >
>> > Wouldn't "oe-core" be a better name, considering that's what
>> > DISTROVERSION becomes if DISTRO is unset?
>> >
>> > Ross
>>
>>
>> Agreed, we already have DISTRO_VERSION = "oe-core.0"
>> This sounds also the right name for THE default distro.
>
> I disagree and I feel quite strongly about this. OE-Core is not a
> distro. The whole idea was that OE-Core should build with sane defaults
> without any distro set. This is a dummy placeholder value and it really
> does mean to say that no distro is set.
>
> We did put a value into the DISTRO_VERSION field so you could tell what
> was being used but again its a placeholder.
>
> So in my view "nodistro" is clearer about what is meant.

yes I concur. change it to nodistro or distroless and please change
DISTRO_VERSION accordingly as well
to be called nodistro.X or distroless.X


>
> Cheers,
>
> Richard
>
>
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

Patch

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index b8e5b02..83378b0 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -599,7 +599,7 @@  def check_sanity_everybuild(status, d):
     # Check that the DISTRO is valid, if set
     # need to take into account DISTRO renaming DISTRO
     distro = d.getVar('DISTRO', True)
-    if distro:
+    if distro and distro != "nodistro":
         if not ( check_conf_exists("conf/distro/${DISTRO}.conf", d) or check_conf_exists("conf/distro/include/${DISTRO}.inc", d) ):
             status.addresult("DISTRO '%s' not found. Please set a valid DISTRO in your local.conf\n" % d.getVar("DISTRO", True))
 
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index d7b7a4b..ea313ad 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -656,6 +656,10 @@  AUTO_LIBNAME_PKGS = "${PACKAGES}"
 ### Config file processing
 ###
 
+# An empty distro leads to :: entries in OVERRIDES and FILEOVERRIDES which 
+# is a bad idea. Setting a dummy value is better than a ton of anonymous python.
+DISTRO ??= "nodistro"
+
 # Overrides are processed left to right, so the ones that are named later take precedence.
 # You generally want them to go from least to most specific.
 #