diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-05-25 08:51:37 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-05-26 10:33:06 +0100 |
commit | 9e9d05205ab0aab374c5688c1c6d8e21b175aba2 (patch) | |
tree | c97f662ac1afe6482219eba532b8a5258578288a /bitbake | |
parent | 7fab819f7f5400989931645f9e4073c1f15cb2ae (diff) | |
download | poky-9e9d05205ab0aab374c5688c1c6d8e21b175aba2.tar.gz |
bitbake: siggen: Don't crash if number of task dependencies change
If the number of task dependencies change you currently get
a traceback when using diffsigs.
(Bitbake rev: c6798b431571aae18bb8699ac6e3ec75b731d719)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/siggen.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py index 2de3aff332..2985272218 100644 --- a/bitbake/lib/bb/siggen.py +++ b/bitbake/lib/bb/siggen.py | |||
@@ -419,12 +419,16 @@ def compare_sigfiles(a, b, recursecb = None): | |||
419 | for f in removed: | 419 | for f in removed: |
420 | output.append("Dependency on checksum of file %s was removed" % (f)) | 420 | output.append("Dependency on checksum of file %s was removed" % (f)) |
421 | 421 | ||
422 | changed = [] | 422 | |
423 | for idx, task in enumerate(a_data['runtaskdeps']): | 423 | if len(a_data['runtaskdeps']) != len(b_data['runtaskdeps']): |
424 | a = a_data['runtaskdeps'][idx] | 424 | changed = ["Number of task dependencies changed"] |
425 | b = b_data['runtaskdeps'][idx] | 425 | else: |
426 | if a_data['runtaskhashes'][a] != b_data['runtaskhashes'][b]: | 426 | changed = [] |
427 | changed.append("%s with hash %s\n changed to\n%s with hash %s" % (a, a_data['runtaskhashes'][a], b, b_data['runtaskhashes'][b])) | 427 | for idx, task in enumerate(a_data['runtaskdeps']): |
428 | a = a_data['runtaskdeps'][idx] | ||
429 | b = b_data['runtaskdeps'][idx] | ||
430 | if a_data['runtaskhashes'][a] != b_data['runtaskhashes'][b]: | ||
431 | changed.append("%s with hash %s\n changed to\n%s with hash %s" % (a, a_data['runtaskhashes'][a], b, b_data['runtaskhashes'][b])) | ||
428 | 432 | ||
429 | if changed: | 433 | if changed: |
430 | output.append("runtaskdeps changed from %s to %s" % (clean_basepaths_list(a_data['runtaskdeps']), clean_basepaths_list(b_data['runtaskdeps']))) | 434 | output.append("runtaskdeps changed from %s to %s" % (clean_basepaths_list(a_data['runtaskdeps']), clean_basepaths_list(b_data['runtaskdeps']))) |