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

login
register
mail settings
Submitter Ross Burton
Date July 18, 2012, 1:42 p.m.
Message ID <1342618950-1081-1-git-send-email-ross.burton@intel.com>
Download mbox | patch
Permalink /patch/32415/
State Accepted
Commit 47e6ab41f0f84e6bed7d337ebf96c954ec6909e8
Headers show

Comments

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

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/classes/sanity.bbclass |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Martin Jansa - July 18, 2012, 1:45 p.m.
On Wed, Jul 18, 2012 at 02:42:30PM +0100, Ross Burton wrote:
> Many people don't understand the nuances of PATH, so help them by clarifying
> the warning and displaying the parsed PATH element-by-element.
> 
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
>  meta/classes/sanity.bbclass |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> index 765958e..5c69d54 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:

Maybe the same should be added to BBPATH test bellow?

Cheers,
Ross Burton - July 18, 2012, 2:13 p.m.
On 18 July 2012 14:45, Martin Jansa <martin.jansa@gmail.com> wrote:
> Maybe the same should be added to BBPATH test bellow?

Yes, good point, I didn't notice that.  V2 sent.

Ross
Saul Wold - July 19, 2012, 7:41 a.m.
On 07/18/2012 06:42 AM, Ross Burton wrote:
> Many people don't understand the nuances of PATH, so help them by clarifying
> the warning and displaying the parsed PATH element-by-element.
>
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
>   meta/classes/sanity.bbclass |    3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> index 765958e..5c69d54 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:
>

Looks like this version was merged into OE-Core, please rebase your 
updated change and re-sbumit.

Thanks
	Sau!

Patch

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 765958e..5c69d54 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: