Openembedded Bitbake Development
 help / color / mirror / Atom feed
* [PATCH] siggen: Add computed hash code to verify hash computation to dumpsig
@ 2014-11-07 17:46 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2014-11-07 17:46 UTC (permalink / raw)
  To: bitbake-devel

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>

diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index 1033785..e92a9c4 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/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




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-11-07 17:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-07 17:46 [PATCH] siggen: Add computed hash code to verify hash computation to dumpsig Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox