]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
data_smart: Fix variable reference issues
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 18 Sep 2013 12:23:54 +0000 (12:23 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 18 Sep 2013 12:27:23 +0000 (13:27 +0100)
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/cache.py
lib/bb/data_smart.py

index b99fa99cfb0042966f4ea1d6ac05d57900e97e9a..318781ba9b0c9fd08de9c9d4c7751fd29e61c2d1 100644 (file)
@@ -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)
index 79bf3310828328b9abeebe9023adabf105e52cae..71b67e458f36fd25f2f54b34df36509681c3d2d9 100644 (file)
@@ -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