aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/siggen.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-18 11:32:04 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-20 11:41:12 +0100
commite026469b307522e5b6a680e0ae5587749d33dcae (patch)
tree2eecc6ac50b7220c96fe719ca9bd7735e0bacfa4 /lib/bb/siggen.py
parent55382f0aac84b8f81cad0b82053c0b8295c33e54 (diff)
downloadbitbake-e026469b307522e5b6a680e0ae5587749d33dcae.tar.gz
build/siggen: Add support for stamp 'clean' masks
Currently when we execute a task, we don't remove other potentially stale stamps. This can mean if you switch between two different versions of a recipe without a clean, the build can get very confused. This patch adds in functionality to allow a wildcard expression of stamp files to be removed when creating a new stamp file. This patch adds in the core of the code to enable this but it also requires metadata support to enable it. When writing this improvement I went through several different options but this was the only way I could find to allow things like noexec tasks to function correctly (where stamps need to be created without the data store). [YOCTO #2961] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/siggen.py')
-rw-r--r--lib/bb/siggen.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/bb/siggen.py b/lib/bb/siggen.py
index 8fe59b905..ff70d4ff4 100644
--- a/lib/bb/siggen.py
+++ b/lib/bb/siggen.py
@@ -48,6 +48,9 @@ class SignatureGenerator(object):
def stampfile(self, stampbase, file_name, taskname, extrainfo):
return ("%s.%s.%s" % (stampbase, taskname, extrainfo)).rstrip('.')
+ def stampcleanmask(self, stampbase, file_name, taskname, extrainfo):
+ return ("%s.%s*.%s" % (stampbase, taskname, extrainfo)).rstrip('.')
+
def dump_sigtask(self, fn, task, stampbase, runtime):
return
@@ -266,18 +269,24 @@ class SignatureGeneratorBasic(SignatureGenerator):
class SignatureGeneratorBasicHash(SignatureGeneratorBasic):
name = "basichash"
- def stampfile(self, stampbase, fn, taskname, extrainfo):
+ def stampfile(self, stampbase, fn, taskname, extrainfo, clean=False):
if taskname != "do_setscene" and taskname.endswith("_setscene"):
k = fn + "." + taskname[:-9]
else:
k = fn + "." + taskname
- if k in self.taskhash:
+ if clean:
+ h = "*"
+ taskname = taskname + "*"
+ elif k in self.taskhash:
h = self.taskhash[k]
else:
# If k is not in basehash, then error
h = self.basehash[k]
return ("%s.%s.%s.%s" % (stampbase, taskname, h, extrainfo)).rstrip('.')
+ def stampcleanmask(self, stampbase, fn, taskname, extrainfo):
+ return self.stampfile(stampbase, fn, taskname, extrainfo, clean=True)
+
def invalidate_task(self, task, d, fn):
bb.note("Tainting hash to force rebuild of task %s, %s" % (fn, task))
bb.build.write_taint(task, d, fn)