>From 583f97149ed3122e7b196f08c6bceca9d5a4961c Mon Sep 17 00:00:00 2001
From: Shiqun Lin <shiqun....@windriver.com>
Date: Thu, 4 Dec 2014 09:50:18 +0800
Subject: [PATCH] improve the sanity check for PATH and BBPATH

Issue: LIN5-19447, Build fails if "./" is in the PATH

a customer was using "./" in his PATH, and this breaks the build.

$ export PATH="./:$PATH"
$ make -C build-tools elfutils

Signed-off-by: Shiqun Lin <shiqun....@windriver.com>
---
 meta/classes/sanity.bbclass | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index c2e7bee..1ade542 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -388,15 +388,15 @@ def check_sanity(sanity_data):
             messages = messages + "qemu-native was in ASSUME_PROVIDED but the QEMU binaries (qemu-arm) can't be found in PATH"
 
     paths = sanity_data.getVar('PATH', True).split(":")
-    if "." in paths or "" in paths:
-        messages = messages + "PATH contains '.' or '', which will break the build, please remove this."
+    if "." in paths or "./" 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:
+    if "." in bbpaths or "./" 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 "\
+                "an empty entry, a './', 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 "           \
-- 
1.8.5.2.233.g932f7e4

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

Reply via email to