summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/cache.py9
-rw-r--r--bitbake/lib/bb/siggen.py6
2 files changed, 15 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index 92e9a3ced7..988c596c39 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -24,6 +24,7 @@ from collections.abc import Mapping
24import bb.utils 24import bb.utils
25from bb import PrefixLoggerAdapter 25from bb import PrefixLoggerAdapter
26import re 26import re
27import shutil
27 28
28logger = logging.getLogger("BitBake.Cache") 29logger = logging.getLogger("BitBake.Cache")
29 30
@@ -998,3 +999,11 @@ class SimpleCache(object):
998 p.dump([data, self.cacheversion]) 999 p.dump([data, self.cacheversion])
999 1000
1000 bb.utils.unlockfile(glf) 1001 bb.utils.unlockfile(glf)
1002
1003 def copyfile(self, target):
1004 if not self.cachefile:
1005 return
1006
1007 glf = bb.utils.lockfile(self.cachefile + ".lock")
1008 shutil.copy(self.cachefile, target)
1009 bb.utils.unlockfile(glf)
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