summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-20 12:07:20 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-20 12:20:21 +0000
commit9b4142df36619099670740a5d3bc94e404ab2b56 (patch)
treeea77857df0ba7c446311e37097d0a0869b2a79d3
parent7a77861feb62750ef166d2d1e89ed1f444ca8dc7 (diff)
downloadbitbake-9b4142df36619099670740a5d3bc94e404ab2b56.tar.gz
siggen: Fix reversed difference output
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>
-rw-r--r--lib/bb/siggen.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/bb/siggen.py b/lib/bb/siggen.py
index 370f6ad3b..bc96fd3b7 100644
--- a/lib/bb/siggen.py
+++ b/lib/bb/siggen.py
@@ -318,8 +318,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):
@@ -411,21 +411,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]))