aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSchmidt, Adriaan <adriaan.schmidt@siemens.com>2022-04-12 09:42:57 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-04-14 09:48:27 +0100
commit7358378b90b68111779e6ae72948e5e7a3de00a9 (patch)
tree65ad3d64affb245fd56f13b4fe1b412175a48343
parentb074f4aff00923acc5bf6649d204d541a79fd2b6 (diff)
downloadbitbake-contrib-7358378b90b68111779e6ae72948e5e7a3de00a9.tar.gz
bitbake-diffsigs: make finding of changed signatures more robust
In `runtaskhashes`, the keys contain the absolute paths to the recipe. When working with shared sstate caches (where these absolute paths can be different) we see that compare_sigfiles does not identifiy a changed hash of a dependent task as "changed", but instead as "removed"&"added", preventing the function from recursing and continuing the comparison. By calling `clean_basepaths` before comparing the `runtaskhashes` dicts, we avoid this. Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/siggen.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/bb/siggen.py b/lib/bb/siggen.py
index 1612b4efa..130b38d8a 100644
--- a/lib/bb/siggen.py
+++ b/lib/bb/siggen.py
@@ -991,8 +991,8 @@ def compare_sigfiles(a, b, recursecb=None, color=False, collapsed=False):
if 'runtaskhashes' in a_data and 'runtaskhashes' in b_data:
- a = a_data['runtaskhashes']
- b = b_data['runtaskhashes']
+ a = clean_basepaths(a_data['runtaskhashes'])
+ b = clean_basepaths(b_data['runtaskhashes'])
changed, added, removed = dict_diff(a, b)
if added:
for dep in sorted(added):
@@ -1003,7 +1003,7 @@ def compare_sigfiles(a, b, recursecb=None, color=False, collapsed=False):
#output.append("Dependency on task %s was replaced by %s with same hash" % (dep, bdep))
bdep_found = True
if not bdep_found:
- output.append(color_format("{color_title}Dependency on task %s was added{color_default} with hash %s") % (clean_basepath(dep), b[dep]))
+ output.append(color_format("{color_title}Dependency on task %s was added{color_default} with hash %s") % (dep, b[dep]))
if removed:
for dep in sorted(removed):
adep_found = False
@@ -1013,11 +1013,11 @@ def compare_sigfiles(a, b, recursecb=None, color=False, collapsed=False):
#output.append("Dependency on task %s was replaced by %s with same hash" % (adep, dep))
adep_found = True
if not adep_found:
- output.append(color_format("{color_title}Dependency on task %s was removed{color_default} with hash %s") % (clean_basepath(dep), a[dep]))
+ output.append(color_format("{color_title}Dependency on task %s was removed{color_default} with hash %s") % (dep, a[dep]))
if changed:
for dep in sorted(changed):
if not collapsed:
- output.append(color_format("{color_title}Hash for task dependency %s changed{color_default} from %s to %s") % (clean_basepath(dep), a[dep], b[dep]))
+ output.append(color_format("{color_title}Hash for task dependency %s changed{color_default} from %s to %s") % (dep, a[dep], b[dep]))
if callable(recursecb):
recout = recursecb(dep, a[dep], b[dep])
if recout: