diff options
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/siggen.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py index f47af6ded8..f497fb9caf 100644 --- a/bitbake/lib/bb/siggen.py +++ b/bitbake/lib/bb/siggen.py | |||
@@ -5,6 +5,7 @@ import re | |||
5 | import tempfile | 5 | import tempfile |
6 | import pickle | 6 | import pickle |
7 | import bb.data | 7 | import bb.data |
8 | import difflib | ||
8 | from bb.checksum import FileChecksumCache | 9 | from bb.checksum import FileChecksumCache |
9 | 10 | ||
10 | logger = logging.getLogger('BitBake.SigGen') | 11 | logger = logging.getLogger('BitBake.SigGen') |
@@ -462,7 +463,16 @@ def compare_sigfiles(a, b, recursecb = None): | |||
462 | changed, added, removed = dict_diff(a_data['varvals'], b_data['varvals']) | 463 | changed, added, removed = dict_diff(a_data['varvals'], b_data['varvals']) |
463 | if changed: | 464 | if changed: |
464 | for dep in changed: | 465 | for dep in changed: |
465 | output.append("Variable %s value changed from '%s' to '%s'" % (dep, a_data['varvals'][dep], b_data['varvals'][dep])) | 466 | oldval = a_data['varvals'][dep] |
467 | newval = b_data['varvals'][dep] | ||
468 | if newval and oldval and ('\n' in oldval or '\n' in newval): | ||
469 | diff = difflib.unified_diff(oldval.splitlines(), newval.splitlines(), lineterm='') | ||
470 | # Cut off the first two lines, since we aren't interested in | ||
471 | # the old/new filename (they are blank anyway in this case) | ||
472 | difflines = list(diff)[2:] | ||
473 | output.append("Variable %s value changed:\n%s" % (dep, '\n'.join(difflines))) | ||
474 | else: | ||
475 | output.append("Variable %s value changed from '%s' to '%s'" % (dep, oldval, newval)) | ||
466 | 476 | ||
467 | if not 'file_checksum_values' in a_data: | 477 | if not 'file_checksum_values' in a_data: |
468 | a_data['file_checksum_values'] = {} | 478 | a_data['file_checksum_values'] = {} |