Skip to contentSkip to conversation

data_smart: Fix caching issue for double remove references

PATCH New Richard Purdie 1 participant 1 message Mar 25, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 data_smart: Fix caching issue for double remove references

FOO = "foo bar"
FOO_remove = "bar"
FOO_FOO = "${FOO} ${FOO}"

would show FOO_FOO = "foo foo bar" rather than the expected "foo foo".

This is actually a cache bug, this patch ensures the right value is put into the cache. The preceeding patch adds a test case to ensure we don't regress in future.

---

bitbake/lib/bb/data_smart.py +4 -0
index 742c7fb..e4bdb2f 100644
@@ -614,6 +614,10 @@ class DataSmart(MutableMapping):
             filtered = filter(lambda v: v not in local_var["_removeactive"],
                               value.split(" "))
             value = " ".join(filtered)
+            if expand:
+                 # We need to ensure the expand cache has the correct value
+                 # flag == "_content" here
+                self.expand_cache[var].value = value
         return value
 
     def delVarFlag(self, var, flag, **loginfo):