Skip to contentSkip to conversation

bitbake.conf: Default DISTRO to nodistro

PATCH In review Richard Purdie 7 participants 9 messages Nov 7, 2013 – Nov 8, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bitbake.conf: Default DISTRO to nodistro

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.

---

meta/classes/sanity.bbclass +1 -1
index b8e5b02..83378b0 100644
@@ -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))
 
meta/conf/bitbake.conf +4 -0
index d7b7a4b..ea313ad 100644
@@ -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.
 # 
#1 lore raw
Quoted 1 line · Richard Purdie

+DISTRO ??= "nodistro"

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

Ross

#2 lore raw
Quoted 8 lines · Ross
Quoted 1 line · Richard Purdie

+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

Quoted 4 lines

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#3 lore raw
Quoted 5 lines · Andrea Adami
Quoted 4 lines · Ross
Quoted 1 line · Richard Purdie

+DISTRO ??= "nodistro"

Quoted 8 lines
Quoted 4 lines

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

#4 lore raw

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.

Quoted 39 lines · Richard Purdie
Quoted 1 line · Andrea Adami

On Fri, Nov 8, 2013 at 10:25 AM, Burton, Ross <[email protected]>

Quoted 4 lines · wrote:
Quoted 4 lines
Quoted 1 line · Richard Purdie

+DISTRO ??= "nodistro"

Quoted 8 lines
Quoted 4 lines

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
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#6 lore raw
In reply to Richard Purdie
Quoted 20 lines · Richard Purdie
Quoted 5 lines · Andrea Adami
Quoted 4 lines · Ross
Quoted 1 line · Richard Purdie

+DISTRO ??= "nodistro"

Quoted 8 lines
Quoted 4 lines

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.

Quoted 4 lines

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'

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#5 lore raw
In reply to Martin Jansa
Quoted 2 lines · Martin Jansa

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.

I like this idea.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#7 lore raw
In reply to Richard Purdie
Quoted 20 lines · Richard Purdie
Quoted 5 lines · Andrea Adami
Quoted 4 lines · Ross
Quoted 1 line · Richard Purdie

+DISTRO ??= "nodistro"

Quoted 8 lines
Quoted 4 lines

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.

Quoted 4 lines

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

Quoted 13 lines

Cheers,

Richard

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#8 lore raw
In reply to Richard Purdie
Quoted 20 lines · Richard Purdie
Quoted 5 lines · Andrea Adami
Quoted 4 lines · Ross
Quoted 1 line · Richard Purdie

+DISTRO ??= "nodistro"

Quoted 8 lines
Quoted 4 lines

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.

Quoted 4 lines

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

Quoted 13 lines

Cheers,

Richard

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core