Openembedded Bitbake Development
 help / color / mirror / Atom feed
* [PATCH] siggen: Fixes to handle sigdata/siginfo files only containing basehash data
@ 2016-05-16 21:51 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2016-05-16 21:51 UTC (permalink / raw)
  To: bitbake-devel

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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index 7f29c62..d48dcdf 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -295,7 +295,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
         computed_basehash = calc_basehash(data)
         if computed_basehash != self.basehash[k]:
             bb.error("Basehash mismatch %s verses %s for %s" % (computed_basehash, self.basehash[k], k))
-        if k in self.taskhash:
+        if runtime and k in self.taskhash:
             computed_taskhash = calc_taskhash(data)
             if computed_taskhash != self.taskhash[k]:
                 bb.error("Taskhash mismatch %s verses %s for %s" % (computed_taskhash, self.taskhash[k], k))
@@ -449,6 +449,11 @@ def compare_sigfiles(a, b, recursecb = None):
         for dep in changed:
             output.append("Variable %s value changed from '%s' to '%s'" % (dep, a_data['varvals'][dep], b_data['varvals'][dep]))
 
+    if not 'file_checksum_values' in a_data:
+         a_data['file_checksum_values'] = {}
+    if not 'file_checksum_values' in b_data:
+         b_data['file_checksum_values'] = {}
+
     changed, added, removed = file_checksums_diff(a_data['file_checksum_values'], b_data['file_checksum_values'])
     if changed:
         for f, old, new in changed:
@@ -460,6 +465,10 @@ def compare_sigfiles(a, b, recursecb = None):
         for f in removed:
             output.append("Dependency on checksum of file %s was removed" % (f))
 
+    if not 'runtaskdeps' in a_data:
+         a_data['runtaskdeps'] = {}
+    if not 'runtaskdeps' in b_data:
+         b_data['runtaskdeps'] = {}
 
     if len(a_data['runtaskdeps']) != len(b_data['runtaskdeps']):
         changed = ["Number of task dependencies changed"]




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

only message in thread, other threads:[~2016-05-16 21:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-16 21:51 [PATCH] siggen: Fixes to handle sigdata/siginfo files only containing basehash data Richard Purdie

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