Patchwork [1/2] sanity.bbclass: move check_path_length(TMPDIR) to check_sanity_everybuild

login
register
mail settings
Submitter Robert Yang
Date Nov. 1, 2013, 5:26 p.m.
Message ID <e4c7045a8072825bcb82bbd7be1432aa95540691.1383326626.git.liezhi.yang@windriver.com>
Download mbox | patch
Permalink /patch/60953/
State New
Headers show

Comments

Richard Purdie - Nov. 1, 2013, 10:39 a.m.
On Sat, 2013-11-02 at 01:26 +0800, Robert Yang wrote:
> We may change the TMPDIR in different builds, so that the
> check_path_length(TMPDIR) should be in check_sanity_everybuild().
> 
> [YOCTO #5442]
> 
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>  meta/classes/sanity.bbclass | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

No.

The stamp than controls these checks is in tmpdir. We detect if tmpdir
moves and error. If we change to a new tmpdir, there will be no stamp
and the check reruns. There is no need to do this every build.

Cheers,

Richard

> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> index b8e5b02..c4827f4 100644
> --- a/meta/classes/sanity.bbclass
> +++ b/meta/classes/sanity.bbclass
> @@ -569,9 +569,6 @@ def check_sanity_version_change(status, d):
>      if not oes_bb_conf:
>          status.addresult('You are not using the OpenEmbedded version of conf/bitbake.conf. This means your environment is misconfigured, in particular check BBPATH.\n')
>  
> -    # The length of tmpdir can't be longer than 410
> -    status.addresult(check_path_length(tmpdir, "TMPDIR", 410))
> -
>  def check_sanity_everybuild(status, d):
>      # Sanity tests which test the users environment so need to run at each build (or are so cheap
>      # it makes sense to always run them.
> @@ -672,6 +669,9 @@ def check_sanity_everybuild(status, d):
>          with open(checkfile, "w") as f:
>              f.write(tmpdir)
>  
> +    # The length of TMPDIR can't be longer than 410
> +    status.addresult(check_path_length(tmpdir, "TMPDIR", 410))
> +
>  def check_sanity(sanity_data):
>      import subprocess
>
Robert Yang - Nov. 1, 2013, 5:26 p.m.
We may change the TMPDIR in different builds, so that the
check_path_length(TMPDIR) should be in check_sanity_everybuild().

[YOCTO #5442]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/classes/sanity.bbclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index b8e5b02..c4827f4 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -569,9 +569,6 @@  def check_sanity_version_change(status, d):
     if not oes_bb_conf:
         status.addresult('You are not using the OpenEmbedded version of conf/bitbake.conf. This means your environment is misconfigured, in particular check BBPATH.\n')
 
-    # The length of tmpdir can't be longer than 410
-    status.addresult(check_path_length(tmpdir, "TMPDIR", 410))
-
 def check_sanity_everybuild(status, d):
     # Sanity tests which test the users environment so need to run at each build (or are so cheap
     # it makes sense to always run them.
@@ -672,6 +669,9 @@  def check_sanity_everybuild(status, d):
         with open(checkfile, "w") as f:
             f.write(tmpdir)
 
+    # The length of TMPDIR can't be longer than 410
+    status.addresult(check_path_length(tmpdir, "TMPDIR", 410))
+
 def check_sanity(sanity_data):
     import subprocess