Patchwork [1/1] sanity.bbclass: only run check_pseudo_wrapper for bitbake

login
register
mail settings
Submitter Dexuan Cui
Date June 20, 2011, 4:25 a.m.
Message ID <2152759b50cc3acc96ee57b242e0b896e65f5e93.1308543589.git.dexuan.cui@intel.com>
Download mbox | patch
Permalink /patch/6129/
State New, archived
Headers show

Comments

Dexuan Cui - June 20, 2011, 4:25 a.m.
This patch eliminates the warning "not been run using the bitbake wrapper..."
when we run bitbake-layers.

Thanks Paul Eggleton for suggesting doing this in sanity.bbclass.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
---
 meta/classes/sanity.bbclass |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
Paul Eggleton - June 20, 2011, 12:39 p.m.
On Monday 20 June 2011 05:25:03 Dexuan Cui wrote:
> This patch eliminates the warning "not been run using the bitbake
> wrapper..." when we run bitbake-layers.
> 
> Thanks Paul Eggleton for suggesting doing this in sanity.bbclass.
> 
> Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
> ---
>  meta/classes/sanity.bbclass |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> index fc005aa..d296c86 100644
> --- a/meta/classes/sanity.bbclass
> +++ b/meta/classes/sanity.bbclass
> @@ -42,6 +42,10 @@ def check_sanity_version_change():
>      return ""
> 
>  def check_pseudo_wrapper():
> +    import sys
> +    if not sys.argv[0].endswith('/bitbake'):
> +        return ""
> +
>      import subprocess as sub
>      # Check if bitbake wrapper is being used
>      pseudo_build = os.environ.get( 'PSEUDO_BUILD' )

Looks good to me.

Acked-by: Paul Eggleton <paul.eggleton@linux.intel.com>

Patch

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index fc005aa..d296c86 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -42,6 +42,10 @@  def check_sanity_version_change():
     return ""
 
 def check_pseudo_wrapper():
+    import sys
+    if not sys.argv[0].endswith('/bitbake'):
+        return ""
+
     import subprocess as sub
     # Check if bitbake wrapper is being used
     pseudo_build = os.environ.get( 'PSEUDO_BUILD' )