From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: [PATCH] bitbake.conf: Default DISTRO to nodistro
Date: Thu, 07 Nov 2013 23:18:46 +0000 [thread overview]
Message-ID: <1383866326.6271.286.camel@ted> (raw)
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>
---
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.
#
next reply other threads:[~2013-11-07 23:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-07 23:18 Richard Purdie [this message]
2013-11-08 9:25 ` [PATCH] bitbake.conf: Default DISTRO to nodistro Burton, Ross
2013-11-08 9:33 ` Andrea Adami
2013-11-08 9:33 ` [OE-core] " Andrea Adami
2013-11-08 9:47 ` Richard Purdie
2013-11-08 9:47 ` [OE-core] " Richard Purdie
2013-11-08 11:23 ` Martin Jansa
2013-11-08 11:23 ` [OE-core] " Martin Jansa
2013-11-08 11:58 ` Otavio Salvador
2013-11-08 11:58 ` [OE-core] " Otavio Salvador
2013-11-08 11:58 ` Otavio Salvador
2013-11-08 11:58 ` [OE-core] " Otavio Salvador
2013-11-08 15:33 ` Mark Hatle
2013-11-08 16:28 ` Khem Raj
2013-11-08 16:28 ` [OE-core] " Khem Raj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1383866326.6271.286.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.