From f1ff3c2fdceda7829ee2393fa60856ab49ef7713 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 18 Sep 2013 12:23:54 +0000 Subject: [PATCH] bitbake: data_smart: Fix variable reference issues The change to use the expansion cache in VariableParse was incorrect as it was adding in references it shouldn't have been. This patch corrects the codepaths and ensures the references are correct. The cache version is bumped since the previous bug could have leave to invalid checksum calculations and a clean cache is therefore desireable. The impact of the bug was that sstate was not getting reused when it should and some tasks were also being rerun when they should not have been. (Bitbake rev: 8a42d082315bd6ce091d006bf83476db257fa48b) Signed-off-by: Richard Purdie --- bitbake/lib/bb/cache.py | 2 +- bitbake/lib/bb/data_smart.py | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py index b99fa99cfb..318781ba9b 100644 --- a/bitbake/lib/bb/cache.py +++ b/bitbake/lib/bb/cache.py @@ -43,7 +43,7 @@ except ImportError: logger.info("Importing cPickle failed. " "Falling back to a very slow implementation.") -__cache_version__ = "146" +__cache_version__ = "147" def getCacheFile(path, filename, data_hash): return os.path.join(path, filename + "." + data_hash) diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index 79bf331082..71b67e458f 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py @@ -96,10 +96,9 @@ class VariableParse: raise Exception("variable %s references itself!" % self.varname) if key in self.d.expand_cache: varparse = self.d.expand_cache[key] - self.references |= varparse.references - self.execs |= varparse.execs - return varparse.value - var = self.d.getVar(key, True) + var = varparse.value + else: + var = self.d.getVar(key, True) self.references.add(key) if var is not None: return var