From: git@git.openembedded.org
To: bitbake-devel@lists.openembedded.org
Subject: Richard Purdie : siggen: Ensure correct runtask dependency output is shown for diffsigs
Date: Fri, 20 Jan 2012 16:50:58 +0000 (UTC) [thread overview]
Message-ID: <20120120165058.7DF6510335@opal> (raw)
Module: bitbake.git
Branch: master
Commit: 7da7dff83ed765c9cde1d7f91ee1b65e49520481
URL: http://git.openembedded.org/?p=bitbake.git&a=commit;h=7da7dff83ed765c9cde1d7f91ee1b65e49520481
Author: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Thu Jan 19 19:37:29 2012 +0000
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
lib/bb/siggen.py | 36 +++++++++++++++++++++---------------
1 files changed, 21 insertions(+), 15 deletions(-)
diff --git a/lib/bb/siggen.py b/lib/bb/siggen.py
index 22417b9..d9d0294 100644
--- a/lib/bb/siggen.py
+++ b/lib/bb/siggen.py
@@ -281,21 +281,27 @@ def compare_sigfiles(a, b):
print "Variable %s value changed from %s to %s" % (dep, a_data['varvals'][dep], b_data['varvals'][dep])
if 'runtaskhashes' in a_data and 'runtaskhashes' in b_data:
- a = clean_basepaths(a_data['runtaskhashes'])
- b = clean_basepaths(b_data['runtaskhashes'])
- changed, added, removed = dict_diff(a, b)
- if added:
- for dep in added:
- print "Dependency on task %s was added" % (dep)
- if removed:
- for dep in removed:
- print "Dependency on task %s was removed" % (dep)
- if changed:
- for dep in changed:
- print "Hash for dependent task %s changed from %s to %s" % (dep, a[dep], b[dep])
- elif 'runtaskdeps' in a_data and 'runtaskdeps' in b_data and sorted(a_data['runtaskdeps']) != sorted(b_data['runtaskdeps']):
- print "Tasks this task depends on changed from %s to %s" % (sorted(a_data['runtaskdeps']), sorted(b_data['runtaskdeps']))
- print "changed items: %s" % a_data['runtaskdeps'].symmetric_difference(b_data['runtaskdeps'])
+ if len(a_data['runtaskdeps']) != len(b_data['runtaskdeps']):
+ a = clean_basepaths(a_data['runtaskhashes'])
+ b = clean_basepaths(b_data['runtaskhashes'])
+ changed, added, removed = dict_diff(a, b)
+ if added:
+ for dep in added:
+ print "Dependency on task %s was added" % (dep)
+ if removed:
+ for dep in removed:
+ print "Dependency on task %s was removed" % (dep)
+ if changed:
+ for dep in changed:
+ print "Hash for dependent task %s changed from %s to %s" % (dep, a[dep], b[dep])
+ else:
+ for i in range(len(a_data['runtaskdeps'])):
+ aent = a_data['runtaskdeps'][i]
+ bent = b_data['runtaskdeps'][i]
+ aname = clean_basepath(aent)
+ bname = clean_basepath(bent)
+ if a_data['runtaskhashes'][aent] != b_data['runtaskhashes'][bent]:
+ print "Task dependency hash changed from %s to %s (for %s and %s)" % (a_data['runtaskhashes'][aent], b_data['runtaskhashes'][bent], aname, bname)
def dump_sigfile(a):
p1 = pickle.Unpickler(file(a, "rb"))
reply other threads:[~2012-01-20 16:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120120165058.7DF6510335@opal \
--to=git@git.openembedded.org \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.