Patchwork [1/4] sanity.bbclass: move conf/sanity_info into TMPDIR

login
register
mail settings
Submitter Robert Yang
Date Nov. 4, 2013, 10:40 p.m.
Message ID <50d08f9838c43df14de5c2700e08779e102cfc1f.1383604532.git.liezhi.yang@windriver.com>
Download mbox | patch
Permalink /patch/61105/
State New
Headers show

Comments

Robert Yang - Nov. 4, 2013, 10:40 p.m.
Move conf/sanity_info into TMPDIR, otherwise, when we reset TMPDIR to
another dir, the SANITY_VERSION from conf/sanity_info and
sanity_data.getVar('SANITY_VERSION', True) are still the same, so that
the check_sanity_version_change() would not rerun.

Another fix is that we can move the TMPDIR/saved_tmpdir to conf dir, but
that will make we can't reset the TMPDIR.

[YOCTO #5442]

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

Patch

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index b8e5b02..5f085ee 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -694,7 +694,7 @@  def check_sanity(sanity_data):
     last_sanity_version = 0
     last_tmpdir = ""
     last_sstate_dir = ""
-    sanityverfile = sanity_data.expand("${TOPDIR}/conf/sanity_info")
+    sanityverfile = os.path.join(tmpdir, "sanity_info")
     if os.path.exists(sanityverfile):
         with open(sanityverfile, 'r') as f:
             for line in f: