summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbitbake/bin/bitbake-diffsigs2
-rw-r--r--bitbake/lib/bb/siggen.py24
2 files changed, 19 insertions, 7 deletions
diff --git a/bitbake/bin/bitbake-diffsigs b/bitbake/bin/bitbake-diffsigs
index a8f49191b0..8202c78623 100755
--- a/bitbake/bin/bitbake-diffsigs
+++ b/bitbake/bin/bitbake-diffsigs
@@ -99,7 +99,7 @@ def recursecb(key, hash1, hash2):
99 elif hash2 not in hashfiles: 99 elif hash2 not in hashfiles:
100 recout.append("Unable to find matching sigdata for %s with hash %s" % (key, hash2)) 100 recout.append("Unable to find matching sigdata for %s with hash %s" % (key, hash2))
101 else: 101 else:
102 out2 = bb.siggen.compare_sigfiles(hashfiles[hash1], hashfiles[hash2], recursecb, color=color) 102 out2 = bb.siggen.compare_sigfiles(hashfiles[hash1]['path'], hashfiles[hash2]['path'], recursecb, color=color)
103 for change in out2: 103 for change in out2:
104 for line in change.splitlines(): 104 for line in change.splitlines():
105 recout.append(' ' + line) 105 recout.append(' ' + line)
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index 5a584cadf9..58854aee76 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -849,10 +849,18 @@ def compare_sigfiles(a, b, recursecb=None, color=False, collapsed=False):
849 formatparams.update(values) 849 formatparams.update(values)
850 return formatstr.format(**formatparams) 850 return formatstr.format(**formatparams)
851 851
852 with bb.compress.zstd.open(a, "rt", encoding="utf-8", num_threads=1) as f: 852 try:
853 a_data = json.load(f, object_hook=SetDecoder) 853 with bb.compress.zstd.open(a, "rt", encoding="utf-8", num_threads=1) as f:
854 with bb.compress.zstd.open(b, "rt", encoding="utf-8", num_threads=1) as f: 854 a_data = json.load(f, object_hook=SetDecoder)
855 b_data = json.load(f, object_hook=SetDecoder) 855 except (TypeError, OSError) as err:
856 bb.error("Failed to open sigdata file '%s': %s" % (a, str(err)))
857 raise err
858 try:
859 with bb.compress.zstd.open(b, "rt", encoding="utf-8", num_threads=1) as f:
860 b_data = json.load(f, object_hook=SetDecoder)
861 except (TypeError, OSError) as err:
862 bb.error("Failed to open sigdata file '%s': %s" % (b, str(err)))
863 raise err
856 864
857 for data in [a_data, b_data]: 865 for data in [a_data, b_data]:
858 handle_renames(data) 866 handle_renames(data)
@@ -1090,8 +1098,12 @@ def calc_taskhash(sigdata):
1090def dump_sigfile(a): 1098def dump_sigfile(a):
1091 output = [] 1099 output = []
1092 1100
1093 with bb.compress.zstd.open(a, "rt", encoding="utf-8", num_threads=1) as f: 1101 try:
1094 a_data = json.load(f, object_hook=SetDecoder) 1102 with bb.compress.zstd.open(a, "rt", encoding="utf-8", num_threads=1) as f:
1103 a_data = json.load(f, object_hook=SetDecoder)
1104 except (TypeError, OSError) as err:
1105 bb.error("Failed to open sigdata file '%s': %s" % (a, str(err)))
1106 raise err
1095 1107
1096 handle_renames(a_data) 1108 handle_renames(a_data)
1097 1109