From patchwork Mon Jun 18 19:57:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [3/6] sanity.bbclass: warn the user if BBPATH contains wrong entries Date: Mon, 18 Jun 2012 19:57:57 -0000 From: Scott Garman X-Patchwork-Id: 30073 Message-Id: <8e362de541f2827cb615e86b850353d929d33d24.1340038108.git.scott.a.garman@intel.com> To: openembedded-core@lists.openembedded.org From: Laurentiu Palcu If BBPATH references the working directory, the user is warned and asked to fix the problem. [Yocto #1465] Signed-off-by: Laurentiu Palcu Signed-off-by: Richard Purdie Reworked commit to fix merge conflicts with denzil branch. Signed-off-by: Scott Garman --- meta/classes/sanity.bbclass | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index 9755694..298372b 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass @@ -310,7 +310,18 @@ def check_sanity(sanity_data): if "." in data.getVar('PATH', sanity_data, True).split(":"): messages = messages + "PATH contains '.' which will break the build, please remove this" - if data.getVar('TARGET_ARCH', sanity_data, True) == "arm": + 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: if os.path.exists("/proc/sys/vm/mmap_min_addr"):