summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/siggen.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-06-01 19:14:41 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-06-02 12:28:21 +0100
commitbcf935cd1bd7b0ed0b636fd8b984cd7dab3ebd3e (patch)
treedbd25c21fd022398ba5155b33fa8edd1911fa729 /bitbake/lib/bb/siggen.py
parent3664efc86a020d782f43eda540872fca07293823 (diff)
downloadpoky-bcf935cd1bd7b0ed0b636fd8b984cd7dab3ebd3e.tar.gz
bitbake: cache/siggen: Add unihash cache copy function
We see rare failures in eSDK generation with zero sized unihash cache files. This is almost certainly due to races in the cache file being updated. Add a copy function where the cache file can be copied with the lock held to avoid this. (Bitbake rev: 9e72a3915e36cb843037040cb68a82077436dbef) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/siggen.py')
-rw-r--r--bitbake/lib/bb/siggen.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index 08eca7860e..3f3d6df54d 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -120,6 +120,9 @@ class SignatureGenerator(object):
120 def save_unitaskhashes(self): 120 def save_unitaskhashes(self):
121 return 121 return
122 122
123 def copy_unitaskhashes(self, targetdir):
124 return
125
123 def set_setscene_tasks(self, setscene_tasks): 126 def set_setscene_tasks(self, setscene_tasks):
124 return 127 return
125 128
@@ -358,6 +361,9 @@ class SignatureGeneratorBasic(SignatureGenerator):
358 def save_unitaskhashes(self): 361 def save_unitaskhashes(self):
359 self.unihash_cache.save(self.unitaskhashes) 362 self.unihash_cache.save(self.unitaskhashes)
360 363
364 def copy_unitaskhashes(self, targetdir):
365 self.unihash_cache.copyfile(targetdir)
366
361 def dump_sigtask(self, fn, task, stampbase, runtime): 367 def dump_sigtask(self, fn, task, stampbase, runtime):
362 368
363 tid = fn + ":" + task 369 tid = fn + ":" + task