aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/siggen.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-08-27 21:44:35 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-07 12:10:45 +0100
commite58eb8cbb0f9ecd4afa23ffb64c8467b24d93c5c (patch)
tree6be029b25e2b74e9338a6932d88168317c7bdb7b /bitbake/lib/bb/siggen.py
parentd5226c96d3c64bcfa8922327594663352703a8a8 (diff)
downloadopenembedded-core-contrib-e58eb8cbb0f9ecd4afa23ffb64c8467b24d93c5c.tar.gz
bitbake: bitbake-diffsigs: allow specifying task & follow deps recursively
Add the ability to compare the two most recent runs of a specified task, and follow dependent hash changes recursively. This enables you to trace back and find exactly why a task was re-run after the fact. Note that this relies on the metadata providing a function, hooked in as bb.siggen.find_siginfo, which allows searching in the appropriate places to find signature data files. (Bitbake rev: cc70181659c07e04c205e17832846acf1ff31d28) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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):
b[clean_basepath(x)] = a[x]
return b
-def compare_sigfiles(a, b):
+def compare_sigfiles(a, b, recursecb = None):
output = []
p1 = pickle.Unpickler(open(a, "rb"))
@@ -369,8 +369,8 @@ def compare_sigfiles(a, b):
if 'runtaskhashes' in a_data and 'runtaskhashes' in b_data:
- a = clean_basepaths(a_data['runtaskhashes'])
- b = clean_basepaths(b_data['runtaskhashes'])
+ a = a_data['runtaskhashes']
+ b = b_data['runtaskhashes']
changed, added, removed = dict_diff(a, b)
if added:
for dep in added:
@@ -381,7 +381,7 @@ def compare_sigfiles(a, b):
#output.append("Dependency on task %s was replaced by %s with same hash" % (dep, bdep))
bdep_found = True
if not bdep_found:
- output.append("Dependency on task %s was added with hash %s" % (dep, a[dep]))
+ output.append("Dependency on task %s was added with hash %s" % (clean_basepath(dep), a[dep]))
if removed:
for dep in removed:
adep_found = False
@@ -391,11 +391,14 @@ def compare_sigfiles(a, b):
#output.append("Dependency on task %s was replaced by %s with same hash" % (adep, dep))
adep_found = True
if not adep_found:
- output.append("Dependency on task %s was removed with hash %s" % (dep, b[dep]))
+ output.append("Dependency on task %s was removed with hash %s" % (clean_basepath(dep), b[dep]))
if changed:
for dep in changed:
- output.append("Hash for dependent task %s changed from %s to %s" % (dep, a[dep], b[dep]))
-
+ output.append("Hash for dependent task %s changed from %s to %s" % (clean_basepath(dep), a[dep], b[dep]))
+ if callable(recursecb):
+ recout = recursecb(dep, a[dep], b[dep])
+ if recout:
+ output.extend(recout)
a_taint = a_data.get('taint', None)
b_taint = b_data.get('taint', None)