summaryrefslogtreecommitdiff
path: root/meta/classes/sanity.bbclass
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2012-06-13 07:01:43 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-13 11:58:05 +0100
commit73f10ae955ba217078fa2c5288b736ae8a30b184 (patch)
treefb61177d2e8744381ea8f07bd9d8a94d570e1a49 /meta/classes/sanity.bbclass
parent2782caf0f07f61cab92d2981c5e82914f22bd700 (diff)
downloadopenembedded-core-73f10ae955ba217078fa2c5288b736ae8a30b184.tar.gz
openembedded-core-73f10ae955ba217078fa2c5288b736ae8a30b184.tar.bz2
openembedded-core-73f10ae955ba217078fa2c5288b736ae8a30b184.zip
sanity.bbclass: warn the user if BBPATH contains wrong entries
If BBPATH references the working directory, the user is warned and asked to fix the problem. [Yocto #1465] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r--meta/classes/sanity.bbclass11
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index f79fc3f953..6ed1e6f4c6 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -387,6 +387,17 @@ def check_sanity(sanity_data):
if "." in paths or "" in paths:
messages = messages + "PATH contains '.' or '', which will break the build, please remove this."
+ bbpaths = sanity_data.getVar('BBPATH', True).split(":")
+ if "." in bbpaths or "" in bbpaths:
+ # TODO: change the following message to fatal when all BBPATH issues
+ # are fixed
+ bb.warn("BBPATH references the current directory, either through " \
+ "an empty entry, or a '.'.\n\t This is unsafe and means your "\
+ "layer configuration is adding empty elements to BBPATH.\n\t "\
+ "Please check your layer.conf files and other BBPATH " \
+ "settings to remove the current working directory " \
+ "references.");
+
if sanity_data.getVar('TARGET_ARCH', True) == "arm":
# This path is no longer user-readable in modern (very recent) Linux
try: