summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-24 14:55:30 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-26 13:37:34 (GMT)
commit72e03d8a91fab9d774abb577c6620d1bb59ae69f (patch)
tree77fd1e2c6781a74aeee90555aa2877212296a187
parenteab1c2087fd37af7b64c25545a7f39ccd2e607de (diff)
downloadpoky-72e03d8a91fab9d774abb577c6620d1bb59ae69f.tar.gz
bitbake: siggen: Fix sorting in diff output
The diff output isn't deterministic at the moment as the sets can have differing ordering. Sort the output so it is consistent. (Bitbake rev: 117830c1d7ef3e53052fa326e1ca62c5c3946c45) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/siggen.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index 3f9fe50..625a9cf 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -864,21 +864,21 @@ def compare_sigfiles(a, b, recursecb=None, color=False, collapsed=False):
864 864
865 changed, added, removed = dict_diff(a_data['gendeps'], b_data['gendeps'], a_data['basewhitelist'] & b_data['basewhitelist']) 865 changed, added, removed = dict_diff(a_data['gendeps'], b_data['gendeps'], a_data['basewhitelist'] & b_data['basewhitelist'])
866 if changed: 866 if changed:
867 for dep in changed: 867 for dep in sorted(changed):
868 output.append(color_format("{color_title}List of dependencies for variable %s changed from '{color_default}%s{color_title}' to '{color_default}%s{color_title}'") % (dep, a_data['gendeps'][dep], b_data['gendeps'][dep])) 868 output.append(color_format("{color_title}List of dependencies for variable %s changed from '{color_default}%s{color_title}' to '{color_default}%s{color_title}'") % (dep, a_data['gendeps'][dep], b_data['gendeps'][dep]))
869 if a_data['gendeps'][dep] and b_data['gendeps'][dep]: 869 if a_data['gendeps'][dep] and b_data['gendeps'][dep]:
870 output.append("changed items: %s" % a_data['gendeps'][dep].symmetric_difference(b_data['gendeps'][dep])) 870 output.append("changed items: %s" % a_data['gendeps'][dep].symmetric_difference(b_data['gendeps'][dep]))
871 if added: 871 if added:
872 for dep in added: 872 for dep in sorted(added):
873 output.append(color_format("{color_title}Dependency on variable %s was added") % (dep)) 873 output.append(color_format("{color_title}Dependency on variable %s was added") % (dep))
874 if removed: 874 if removed:
875 for dep in removed: 875 for dep in sorted(removed):
876 output.append(color_format("{color_title}Dependency on Variable %s was removed") % (dep)) 876 output.append(color_format("{color_title}Dependency on Variable %s was removed") % (dep))
877 877
878 878
879 changed, added, removed = dict_diff(a_data['varvals'], b_data['varvals']) 879 changed, added, removed = dict_diff(a_data['varvals'], b_data['varvals'])
880 if changed: 880 if changed:
881 for dep in changed: 881 for dep in sorted(changed):
882 oldval = a_data['varvals'][dep] 882 oldval = a_data['varvals'][dep]
883 newval = b_data['varvals'][dep] 883 newval = b_data['varvals'][dep]
884 if newval and oldval and ('\n' in oldval or '\n' in newval): 884 if newval and oldval and ('\n' in oldval or '\n' in newval):
@@ -948,7 +948,7 @@ def compare_sigfiles(a, b, recursecb=None, color=False, collapsed=False):
948 b = b_data['runtaskhashes'] 948 b = b_data['runtaskhashes']
949 changed, added, removed = dict_diff(a, b) 949 changed, added, removed = dict_diff(a, b)
950 if added: 950 if added:
951 for dep in added: 951 for dep in sorted(added):
952 bdep_found = False 952 bdep_found = False
953 if removed: 953 if removed:
954 for bdep in removed: 954 for bdep in removed:
@@ -958,7 +958,7 @@ def compare_sigfiles(a, b, recursecb=None, color=False, collapsed=False):
958 if not bdep_found: 958 if not bdep_found:
959 output.append(color_format("{color_title}Dependency on task %s was added{color_default} with hash %s") % (clean_basepath(dep), b[dep])) 959 output.append(color_format("{color_title}Dependency on task %s was added{color_default} with hash %s") % (clean_basepath(dep), b[dep]))
960 if removed: 960 if removed:
961 for dep in removed: 961 for dep in sorted(removed):
962 adep_found = False 962 adep_found = False
963 if added: 963 if added:
964 for adep in added: 964 for adep in added:
@@ -968,7 +968,7 @@ def compare_sigfiles(a, b, recursecb=None, color=False, collapsed=False):
968 if not adep_found: 968 if not adep_found:
969 output.append(color_format("{color_title}Dependency on task %s was removed{color_default} with hash %s") % (clean_basepath(dep), a[dep])) 969 output.append(color_format("{color_title}Dependency on task %s was removed{color_default} with hash %s") % (clean_basepath(dep), a[dep]))
970 if changed: 970 if changed:
971 for dep in changed: 971 for dep in sorted(changed):
972 if not collapsed: 972 if not collapsed:
973 output.append(color_format("{color_title}Hash for dependent task %s changed{color_default} from %s to %s") % (clean_basepath(dep), a[dep], b[dep])) 973 output.append(color_format("{color_title}Hash for dependent task %s changed{color_default} from %s to %s") % (clean_basepath(dep), a[dep], b[dep]))
974 if callable(recursecb): 974 if callable(recursecb):