* [PATCH] siggen: Fix reversed difference output
@ 2013-12-20 12:07 Richard Purdie
0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2013-12-20 12:07 UTC (permalink / raw)
To: bitbake-devel
The output when comparing siginfo files for dict_diff is reversed and shows
additions when things were removed and vice versa. This patch reverses the operation
so the changes are shown correctly and makes the output less confusing.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index b33db84..16b3548 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -319,8 +319,8 @@ def compare_sigfiles(a, b, recursecb = None):
for i in common:
if a[i] != b[i] and i not in whitelist:
changed.add(i)
- added = sa - sb
- removed = sb - sa
+ added = sb - sa
+ removed = sa - sb
return changed, added, removed
def file_checksums_diff(a, b):
@@ -412,21 +412,21 @@ def compare_sigfiles(a, b, recursecb = None):
bdep_found = False
if removed:
for bdep in removed:
- if a[dep] == b[bdep]:
+ if b[dep] == a[bdep]:
#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" % (clean_basepath(dep), a[dep]))
+ output.append("Dependency on task %s was added with hash %s" % (clean_basepath(dep), b[dep]))
if removed:
for dep in removed:
adep_found = False
if added:
for adep in added:
- if a[adep] == b[dep]:
+ if b[adep] == a[dep]:
#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" % (clean_basepath(dep), b[dep]))
+ output.append("Dependency on task %s was removed with hash %s" % (clean_basepath(dep), a[dep]))
if changed:
for dep in changed:
output.append("Hash for dependent task %s changed from %s to %s" % (clean_basepath(dep), a[dep], b[dep]))
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-12-20 12:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-20 12:07 [PATCH] siggen: Fix reversed difference output Richard Purdie
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.