bitbake: siggen: Make it clear why nostamp tasks signatures don't match
If you run bitbake-diffsigs against two differing sigdata files from nostamp tasks it shows no difference despite the differing checksum. Change the code so this shows up as a nostamp 'taint' and at least makes the issue clearer to the end user. (Bitbake rev: 97679d18955dadaa34f9450564e44da99984d140) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
1630f0a151
commit
cdc57f6116
|
@ -80,6 +80,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
|
||||||
self.taskdeps = {}
|
self.taskdeps = {}
|
||||||
self.runtaskdeps = {}
|
self.runtaskdeps = {}
|
||||||
self.file_checksum_values = {}
|
self.file_checksum_values = {}
|
||||||
|
self.taints = {}
|
||||||
self.gendeps = {}
|
self.gendeps = {}
|
||||||
self.lookupcache = {}
|
self.lookupcache = {}
|
||||||
self.pkgnameextract = re.compile("(?P<fn>.*)\..*")
|
self.pkgnameextract = re.compile("(?P<fn>.*)\..*")
|
||||||
|
@ -199,11 +200,14 @@ class SignatureGeneratorBasic(SignatureGenerator):
|
||||||
if 'nostamp' in taskdep and task in taskdep['nostamp']:
|
if 'nostamp' in taskdep and task in taskdep['nostamp']:
|
||||||
# Nostamp tasks need an implicit taint so that they force any dependent tasks to run
|
# Nostamp tasks need an implicit taint so that they force any dependent tasks to run
|
||||||
import uuid
|
import uuid
|
||||||
data = data + str(uuid.uuid4())
|
taint = str(uuid.uuid4())
|
||||||
|
data = data + taint
|
||||||
|
self.taints[k] = "nostamp:" + taint
|
||||||
|
|
||||||
taint = self.read_taint(fn, task, dataCache.stamp[fn])
|
taint = self.read_taint(fn, task, dataCache.stamp[fn])
|
||||||
if taint:
|
if taint:
|
||||||
data = data + taint
|
data = data + taint
|
||||||
|
self.taints[k] = taint
|
||||||
logger.warn("%s is tainted from a forced run" % k)
|
logger.warn("%s is tainted from a forced run" % k)
|
||||||
|
|
||||||
h = hashlib.md5(data).hexdigest()
|
h = hashlib.md5(data).hexdigest()
|
||||||
|
@ -247,6 +251,10 @@ class SignatureGeneratorBasic(SignatureGenerator):
|
||||||
if taint:
|
if taint:
|
||||||
data['taint'] = taint
|
data['taint'] = taint
|
||||||
|
|
||||||
|
if runtime and k in self.taints:
|
||||||
|
if 'nostamp:' in self.taints[k]:
|
||||||
|
data['taint'] = self.taints[k]
|
||||||
|
|
||||||
fd, tmpfile = tempfile.mkstemp(dir=os.path.dirname(sigfile), prefix="sigtask.")
|
fd, tmpfile = tempfile.mkstemp(dir=os.path.dirname(sigfile), prefix="sigtask.")
|
||||||
try:
|
try:
|
||||||
with os.fdopen(fd, "wb") as stream:
|
with os.fdopen(fd, "wb") as stream:
|
||||||
|
|
Loading…
Reference in New Issue