aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-03-18 17:57:45 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-03-23 22:50:28 +0000
commitb126a53882d202e4df0f9661303355c9fe9ec80e (patch)
treefad4d8ca7935a9ca6ab9ce55c26beb8770b99dac
parent1c2d2875099a3ff9149710d42c679ab31b00f68b (diff)
downloadbitbake-b126a53882d202e4df0f9661303355c9fe9ec80e.tar.gz
bitbake-b126a53882d202e4df0f9661303355c9fe9ec80e.tar.bz2
bitbake-b126a53882d202e4df0f9661303355c9fe9ec80e.zip
build: Add find_stale_stamps function
Add a new function which compares the stamp filename we want (including taskhash) with what is in the stamp directory (using the clean mask). This tells us which stamp files are stale and are due to be rerun. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/build.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/bb/build.py b/lib/bb/build.py
index f4f897e4..b2715fc5 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -854,6 +854,23 @@ def make_stamp(task, d, file_name = None):
file_name = d.getVar('BB_FILENAME')
bb.parse.siggen.dump_sigtask(file_name, task, stampbase, True)
+def find_stale_stamps(task, d, file_name=None):
+ current = stamp_internal(task, d, file_name)
+ current2 = stamp_internal(task + "_setscene", d, file_name)
+ cleanmask = stamp_cleanmask_internal(task, d, file_name)
+ found = []
+ for mask in cleanmask:
+ for name in glob.glob(mask):
+ if "sigdata" in name or "sigbasedata" in name:
+ continue
+ if name.endswith('.taint'):
+ continue
+ if name == current or name == current2:
+ continue
+ logger.debug2("Stampfile %s does not match %s or %s" % (name, current, current2))
+ found.append(name)
+ return found
+
def del_stamp(task, d, file_name = None):
"""
Removes a stamp for a given task