]> code.ossystems Code Review - openembedded-core.git/commitdiff
sstate: Use datastore copies due to data changes persisting
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 21 Dec 2013 08:57:16 +0000 (08:57 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 21 Dec 2013 09:00:16 +0000 (09:00 +0000)
The way the "all arch" PKGSPEC is enabled, it causes corruption
of the datastore of sstate operations against other tasks.

Data store copies are cheap and allow us to use that trick, resetting
to a clean copy of the data afterwards.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/sstate.bbclass

index 377af202a41e7bec9cba013e72014b9898e6a3a6..5a22ff8382fe80bb3558c837365119c7c19e956d 100644 (file)
@@ -300,8 +300,9 @@ def sstate_clean_cachefile(ss, d):
 
 def sstate_clean_cachefiles(d):
     for task in (d.getVar('SSTATETASKS', True) or "").split():
-        ss = sstate_state_fromvars(d, task)
-        sstate_clean_cachefile(ss, d)
+        ld = d.createCopy()
+        ss = sstate_state_fromvars(ld, task)
+        sstate_clean_cachefile(ss, ld)
 
 def sstate_clean_manifest(manifest, d):
     import oe.path
@@ -370,8 +371,9 @@ python sstate_cleanall() {
 
     tasks = d.getVar('SSTATETASKS', True).split()
     for name in tasks:
-        shared_state = sstate_state_fromvars(d, name)
-        sstate_clean(shared_state, d)
+        ld = d.createCopy()
+        shared_state = sstate_state_fromvars(ld, name)
+        sstate_clean(shared_state, ld)
 }
 
 def sstate_hardcode_path(d):