Skip to contentSkip to conversation

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

PATCH New Richard Purdie 1 participant 1 message Nov 7, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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/lib/bb/siggen.py +13 -0
index 1033785..e92a9c4 100644
@@ -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