Patchwork sanity: display the parsed PATH/BBPATH when complaining about CWD elements

login
register
mail settings
Submitter Ross Burton
Date July 18, 2012, 2:12 p.m.
Message ID <1342620750-2552-2-git-send-email-ross.burton@intel.com>
Download mbox | patch
Permalink /patch/32419/
State New
Headers show

Comments

Ross Burton - July 18, 2012, 2:12 p.m.
Many people don't understand the nuances of PATH/BBPATH, so help them by clarifying
the warning and displaying the parsed list element-by-element.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/classes/sanity.bbclass |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Chris Larson - July 18, 2012, 2:53 p.m.
On Wed, Jul 18, 2012 at 7:12 AM, Ross Burton <ross.burton@intel.com> wrote:
> Many people don't understand the nuances of PATH/BBPATH, so help them by clarifying
> the warning and displaying the parsed list element-by-element.
>
> Signed-off-by: Ross Burton <ross.burton@intel.com>

Looks good.
Andrei Gherzan - July 24, 2012, 8:32 p.m.
On Wed, Jul 18, 2012 at 5:12 PM, Ross Burton <ross.burton@intel.com> wrote:

> Many people don't understand the nuances of PATH/BBPATH, so help them by
> clarifying
> the warning and displaying the parsed list element-by-element.
>
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
>  meta/classes/sanity.bbclass |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> index 765958e..52226f1 100644
> --- a/meta/classes/sanity.bbclass
> +++ b/meta/classes/sanity.bbclass
> @@ -390,7 +390,8 @@ def check_sanity(sanity_data):
>
>      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."
> +        messages = messages + "PATH contains '.' or '' (empty element),
> which will break the build, please remove this.\n"
> +        messages = messages + "Parsed PATH is " + str(paths) + "\n"
>
>      bbpaths = sanity_data.getVar('BBPATH', True).split(":")
>      if "." in bbpaths or "" in bbpaths:
> @@ -402,6 +403,7 @@ def check_sanity(sanity_data):
>                  "Please check your layer.conf files and other BBPATH "
>      \
>                  "settings to remove the current working directory "
>     \
>                  "references.");
> +        bb.warn("Parsed BBPATH is" + str(bbpaths));
>
>      if sanity_data.getVar('TARGET_ARCH', True) == "arm":
>          # This path is no longer user-readable in modern (very recent)
> Linux
>

Good change.

ag

Patch

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 765958e..52226f1 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -390,7 +390,8 @@  def check_sanity(sanity_data):
 
     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."
+        messages = messages + "PATH contains '.' or '' (empty element), which will break the build, please remove this.\n"
+        messages = messages + "Parsed PATH is " + str(paths) + "\n"
 
     bbpaths = sanity_data.getVar('BBPATH', True).split(":")
     if "." in bbpaths or "" in bbpaths:
@@ -402,6 +403,7 @@  def check_sanity(sanity_data):
                 "Please check your layer.conf files and other BBPATH "        \
                 "settings to remove the current working directory "           \
                 "references.");
+        bb.warn("Parsed BBPATH is" + str(bbpaths));
 
     if sanity_data.getVar('TARGET_ARCH', True) == "arm":
         # This path is no longer user-readable in modern (very recent) Linux