summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-01-19 19:37:29 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-01-20 16:47:39 +0000
commitf3e51862f1ae2d33077ec6efb42e9e722dabc260 (patch)
tree81d29ebed90b2c8c6916449980151ee34ed9b1f3 /bitbake
parent11cce8013797b4c1623891bd8a191fe326d33ed3 (diff)
downloadpoky-f3e51862f1ae2d33077ec6efb42e9e722dabc260.tar.gz
siggen: Ensure correct runtask dependency output is shown for diffsigs
The actual task names are discounted for comparison of dependent tasks, only the actual hashes are used. This updates the comparison code to account for this change, attempting heuristic matching for more user friendly output but falling back to showing the changed hashes directly. This avoids some confusing output to users where it looked like tasks had changed when they had not and actually had the same hash but a different taskname. (Bitbake rev: 7da7dff83ed765c9cde1d7f91ee1b65e49520481) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/siggen.py36
1 files changed, 21 insertions, 15 deletions
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index 22417b9cdc..d9d0294615 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -281,21 +281,27 @@ def compare_sigfiles(a, b):
281 print "Variable %s value changed from %s to %s" % (dep, a_data['varvals'][dep], b_data['varvals'][dep]) 281 print "Variable %s value changed from %s to %s" % (dep, a_data['varvals'][dep], b_data['varvals'][dep])
282 282
283 if 'runtaskhashes' in a_data and 'runtaskhashes' in b_data: 283 if 'runtaskhashes' in a_data and 'runtaskhashes' in b_data:
284 a = clean_basepaths(a_data['runtaskhashes']) 284 if len(a_data['runtaskdeps']) != len(b_data['runtaskdeps']):
285 b = clean_basepaths(b_data['runtaskhashes']) 285 a = clean_basepaths(a_data['runtaskhashes'])
286 changed, added, removed = dict_diff(a, b) 286 b = clean_basepaths(b_data['runtaskhashes'])
287 if added: 287 changed, added, removed = dict_diff(a, b)
288 for dep in added: 288 if added:
289 print "Dependency on task %s was added" % (dep) 289 for dep in added:
290 if removed: 290 print "Dependency on task %s was added" % (dep)
291 for dep in removed: 291 if removed:
292 print "Dependency on task %s was removed" % (dep) 292 for dep in removed:
293 if changed: 293 print "Dependency on task %s was removed" % (dep)
294 for dep in changed: 294 if changed:
295 print "Hash for dependent task %s changed from %s to %s" % (dep, a[dep], b[dep]) 295 for dep in changed:
296 elif 'runtaskdeps' in a_data and 'runtaskdeps' in b_data and sorted(a_data['runtaskdeps']) != sorted(b_data['runtaskdeps']): 296 print "Hash for dependent task %s changed from %s to %s" % (dep, a[dep], b[dep])
297 print "Tasks this task depends on changed from %s to %s" % (sorted(a_data['runtaskdeps']), sorted(b_data['runtaskdeps'])) 297 else:
298 print "changed items: %s" % a_data['runtaskdeps'].symmetric_difference(b_data['runtaskdeps']) 298 for i in range(len(a_data['runtaskdeps'])):
299 aent = a_data['runtaskdeps'][i]
300 bent = b_data['runtaskdeps'][i]
301 aname = clean_basepath(aent)
302 bname = clean_basepath(bent)
303 if a_data['runtaskhashes'][aent] != b_data['runtaskhashes'][bent]:
304 print "Task dependency hash changed from %s to %s (for %s and %s)" % (a_data['runtaskhashes'][aent], b_data['runtaskhashes'][bent], aname, bname)
299 305
300def dump_sigfile(a): 306def dump_sigfile(a):
301 p1 = pickle.Unpickler(file(a, "rb")) 307 p1 = pickle.Unpickler(file(a, "rb"))