summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-16 22:51:08 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-17 14:43:31 +0100
commit62384f5467fe6111344cbd527e3424f2acabf560 (patch)
treeb6c1efa87ecc3a29f2099183928a8c6129d0e52e /bitbake
parent74ae91e0bd29fe640cb4a3d5caf57cc5192860f7 (diff)
downloadpoky-62384f5467fe6111344cbd527e3424f2acabf560.tar.gz
bitbake: siggen: Fixes to handle sigdata/siginfo files only containing basehash data
The signature data file comparison functions are meant to be able to handle data files containing just the base hash data. This had regressed in some places so add fixes to allow these comparisons to be made. The runtime components in the data files are optional. (Bitbake rev: 2a6659fd748e255a02c2f9d047829d6edfe65317) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/siggen.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index 21ecd8fbf5..e4085cfba7 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -299,7 +299,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
299 computed_basehash = calc_basehash(data) 299 computed_basehash = calc_basehash(data)
300 if computed_basehash != self.basehash[k]: 300 if computed_basehash != self.basehash[k]:
301 bb.error("Basehash mismatch %s verses %s for %s" % (computed_basehash, self.basehash[k], k)) 301 bb.error("Basehash mismatch %s verses %s for %s" % (computed_basehash, self.basehash[k], k))
302 if k in self.taskhash: 302 if runtime and k in self.taskhash:
303 computed_taskhash = calc_taskhash(data) 303 computed_taskhash = calc_taskhash(data)
304 if computed_taskhash != self.taskhash[k]: 304 if computed_taskhash != self.taskhash[k]:
305 bb.error("Taskhash mismatch %s verses %s for %s" % (computed_taskhash, self.taskhash[k], k)) 305 bb.error("Taskhash mismatch %s verses %s for %s" % (computed_taskhash, self.taskhash[k], k))
@@ -453,6 +453,11 @@ def compare_sigfiles(a, b, recursecb = None):
453 for dep in changed: 453 for dep in changed:
454 output.append("Variable %s value changed from '%s' to '%s'" % (dep, a_data['varvals'][dep], b_data['varvals'][dep])) 454 output.append("Variable %s value changed from '%s' to '%s'" % (dep, a_data['varvals'][dep], b_data['varvals'][dep]))
455 455
456 if not 'file_checksum_values' in a_data:
457 a_data['file_checksum_values'] = {}
458 if not 'file_checksum_values' in b_data:
459 b_data['file_checksum_values'] = {}
460
456 changed, added, removed = file_checksums_diff(a_data['file_checksum_values'], b_data['file_checksum_values']) 461 changed, added, removed = file_checksums_diff(a_data['file_checksum_values'], b_data['file_checksum_values'])
457 if changed: 462 if changed:
458 for f, old, new in changed: 463 for f, old, new in changed:
@@ -464,6 +469,10 @@ def compare_sigfiles(a, b, recursecb = None):
464 for f in removed: 469 for f in removed:
465 output.append("Dependency on checksum of file %s was removed" % (f)) 470 output.append("Dependency on checksum of file %s was removed" % (f))
466 471
472 if not 'runtaskdeps' in a_data:
473 a_data['runtaskdeps'] = {}
474 if not 'runtaskdeps' in b_data:
475 b_data['runtaskdeps'] = {}
467 476
468 if len(a_data['runtaskdeps']) != len(b_data['runtaskdeps']): 477 if len(a_data['runtaskdeps']) != len(b_data['runtaskdeps']):
469 changed = ["Number of task dependencies changed"] 478 changed = ["Number of task dependencies changed"]