summaryrefslogtreecommitdiffstats
path: root/lib/bb/siggen.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-11-07 17:46:05 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-11-08 11:01:36 +0000
commit54ecf96c6f031927ee2410f6efde4e16f19bbf66 (patch)
treeb7ceea177908f3a453e58f62eb44bdf2ced680f0 /lib/bb/siggen.py
parent40c95cb9def282dc88234cd72ff462d7a01e47c1 (diff)
downloadopenembedded-core-contrib-54ecf96c6f031927ee2410f6efde4e16f19bbf66.tar.gz
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. 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, 13 insertions, 0 deletions
diff --git a/lib/bb/siggen.py b/lib/bb/siggen.py
index 1033785e05..e92a9c48a7 100644
--- a/lib/bb/siggen.py
+++ b/lib/bb/siggen.py
@@ -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