summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/siggen.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/siggen.py')
-rw-r--r--bitbake/lib/bb/siggen.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index 8d1501b8ae..8fe59b9057 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -301,7 +301,7 @@ def clean_basepaths(a):
301 b[clean_basepath(x)] = a[x] 301 b[clean_basepath(x)] = a[x]
302 return b 302 return b
303 303
304def compare_sigfiles(a, b): 304def compare_sigfiles(a, b, recursecb = None):
305 output = [] 305 output = []
306 306
307 p1 = pickle.Unpickler(open(a, "rb")) 307 p1 = pickle.Unpickler(open(a, "rb"))
@@ -369,8 +369,8 @@ def compare_sigfiles(a, b):
369 369
370 370
371 if 'runtaskhashes' in a_data and 'runtaskhashes' in b_data: 371 if 'runtaskhashes' in a_data and 'runtaskhashes' in b_data:
372 a = clean_basepaths(a_data['runtaskhashes']) 372 a = a_data['runtaskhashes']
373 b = clean_basepaths(b_data['runtaskhashes']) 373 b = b_data['runtaskhashes']
374 changed, added, removed = dict_diff(a, b) 374 changed, added, removed = dict_diff(a, b)
375 if added: 375 if added:
376 for dep in added: 376 for dep in added:
@@ -381,7 +381,7 @@ def compare_sigfiles(a, b):
381 #output.append("Dependency on task %s was replaced by %s with same hash" % (dep, bdep)) 381 #output.append("Dependency on task %s was replaced by %s with same hash" % (dep, bdep))
382 bdep_found = True 382 bdep_found = True
383 if not bdep_found: 383 if not bdep_found:
384 output.append("Dependency on task %s was added with hash %s" % (dep, a[dep])) 384 output.append("Dependency on task %s was added with hash %s" % (clean_basepath(dep), a[dep]))
385 if removed: 385 if removed:
386 for dep in removed: 386 for dep in removed:
387 adep_found = False 387 adep_found = False
@@ -391,11 +391,14 @@ def compare_sigfiles(a, b):
391 #output.append("Dependency on task %s was replaced by %s with same hash" % (adep, dep)) 391 #output.append("Dependency on task %s was replaced by %s with same hash" % (adep, dep))
392 adep_found = True 392 adep_found = True
393 if not adep_found: 393 if not adep_found:
394 output.append("Dependency on task %s was removed with hash %s" % (dep, b[dep])) 394 output.append("Dependency on task %s was removed with hash %s" % (clean_basepath(dep), b[dep]))
395 if changed: 395 if changed:
396 for dep in changed: 396 for dep in changed:
397 output.append("Hash for dependent task %s changed from %s to %s" % (dep, a[dep], b[dep])) 397 output.append("Hash for dependent task %s changed from %s to %s" % (clean_basepath(dep), a[dep], b[dep]))
398 398 if callable(recursecb):
399 recout = recursecb(dep, a[dep], b[dep])
400 if recout:
401 output.extend(recout)
399 402
400 a_taint = a_data.get('taint', None) 403 a_taint = a_data.get('taint', None)
401 b_taint = b_data.get('taint', None) 404 b_taint = b_data.get('taint', None)