[oe-commits] Richard Purdie : bitbake.conf: Default DISTRO to nodistro

git at git.openembedded.org git at git.openembedded.org
Tue Nov 12 16:09:29 UTC 2013


Module: openembedded-core.git
Branch: master
Commit: b7279f99639774674da806d37d252f388f33055f
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=b7279f99639774674da806d37d252f388f33055f

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Thu Nov  7 22:35:07 2013 +0000

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.

DISTRO_VERSION and SDK_VERSION are also updated to match.

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/sanity.bbclass                     | 2 +-
 meta/conf/bitbake.conf                          | 4 ++++
 meta/conf/distro/include/default-distrovars.inc | 4 ++--
 3 files changed, 7 insertions(+), 3 deletions(-)

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.
 # 
diff --git a/meta/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc
index d275525..5ef9c32 100644
--- a/meta/conf/distro/include/default-distrovars.inc
+++ b/meta/conf/distro/include/default-distrovars.inc
@@ -43,8 +43,8 @@ NO32LIBS ??= "1"
 
 # Default to emitting logfiles if a build fails.
 BBINCLUDELOGS ??= "yes"
-SDK_VERSION ??= "oe-core.0"
-DISTRO_VERSION ??= "oe-core.0"
+SDK_VERSION ??= "nodistro.0"
+DISTRO_VERSION ??= "nodistro.0"
 
 # Missing checksums should raise an error
 BB_STRICT_CHECKSUM = "1"



More information about the Openembedded-commits mailing list