bitbake: siggen: Add computed hash code to verify hash computation to dumpsig

This is useful code to double check the computed checksum value if nothing
else. Might as well have it in tree.

(Bitbake rev: 54ecf96c6f031927ee2410f6efde4e16f19bbf66)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2014-11-07 17:46:05 +00:00
parent 636dcb84fe
commit 2db07ca8a3
1 changed files with 13 additions and 0 deletions

View File

@ -499,4 +499,17 @@ def dump_sigfile(a):
if 'taint' in a_data:
output.append("Tainted (by forced/invalidated task): %s" % a_data['taint'])
data = a_data['basehash']
for dep in a_data['runtaskdeps']:
data = data + a_data['runtaskhashes'][dep]
for c in a_data['file_checksum_values']:
data = data + c[1]
if 'taint' in a_data:
data = data + a_data['taint']
h = hashlib.md5(data).hexdigest()
output.append("Computed Hash is %s" % h)
return output