[dunfell,3/3] sstate: inside the threadedpool don't write to the shared localdata

Message ID 604146a242c3d5f5a9872bb756910f4bd1b58406.1646748150.git.steve@sakoman.com
State Accepted, archived
Commit 604146a242c3d5f5a9872bb756910f4bd1b58406
Headers show
Series [dunfell,1/3] asciidoc: update git repository | expand

Commit Message

Steve Sakoman March 8, 2022, 2:13 p.m. UTC
From: Jose Quaresma <quaresma.jose@gmail.com>

When inside the threadedpool we make a copy of the localdata
to avoid some race condition, so we need to use this new
localdata2 and stop write the shared localdata.

Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 90fe6948a9df0b43c58120a9358adb3da1ceb5b9)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 meta/classes/sstate.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 00a0e8fbd7..3d6fb84d63 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -961,7 +961,7 @@  def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True,
 
             localdata2 = bb.data.createCopy(localdata)
             srcuri = "file://" + sstatefile
-            localdata.setVar('SRC_URI', srcuri)
+            localdata2.setVar('SRC_URI', srcuri)
             bb.debug(2, "SState: Attempting to fetch %s" % srcuri)
 
             try: