diff options
author | Valentin Rothberg <valentinrothberg@gmail.com> | 2015-03-23 13:40:49 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-24 10:18:44 -0400 |
commit | e9533ae539d5cc3d5fc501529d2df7b77e20449c (patch) | |
tree | 9dc0125bdc33460c5b89aecc48d6e0b70e5f2919 | |
parent | a087146c72bad795bcab80e5987c5b80fa225000 (diff) |
checkkconfigsymbols.py: fix sorted output
Commit b1a3f243485f ("checkkconfigsymbols.py: make it Git aware")
mistakenly removed to print undefined Kconfig symbols in alphabetical
order. Furthermore, the script does not print anything anymore when the
entire tree is checked (i.e., when no commit is specified).
This patch restores the sorted output and adds the missing print for the
default case. Additionally, the file lists are now sorted as well which
(a) makes it easier to read and (b) makes the output deterministic.
Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rwxr-xr-x | scripts/checkkconfigsymbols.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/checkkconfigsymbols.py b/scripts/checkkconfigsymbols.py index ce9ca60808b8..74086a583d8d 100755 --- a/scripts/checkkconfigsymbols.py +++ b/scripts/checkkconfigsymbols.py | |||
@@ -112,14 +112,15 @@ def main(): | |||
112 | undefined_b = check_symbols() | 112 | undefined_b = check_symbols() |
113 | 113 | ||
114 | # report cases that are present for the commit but not before | 114 | # report cases that are present for the commit but not before |
115 | for feature in undefined_b: | 115 | for feature in sorted(undefined_b): |
116 | # feature has not been undefined before | 116 | # feature has not been undefined before |
117 | if not feature in undefined_a: | 117 | if not feature in undefined_a: |
118 | files = undefined_b.get(feature) | 118 | files = sorted(undefined_b.get(feature)) |
119 | print "%s\t%s" % (feature, ", ".join(files)) | 119 | print "%s\t%s" % (feature, ", ".join(files)) |
120 | # check if there are new files that reference the undefined feature | 120 | # check if there are new files that reference the undefined feature |
121 | else: | 121 | else: |
122 | files = undefined_b.get(feature) - undefined_a.get(feature) | 122 | files = sorted(undefined_b.get(feature) - |
123 | undefined_a.get(feature)) | ||
123 | if files: | 124 | if files: |
124 | print "%s\t%s" % (feature, ", ".join(files)) | 125 | print "%s\t%s" % (feature, ", ".join(files)) |
125 | 126 | ||
@@ -129,8 +130,9 @@ def main(): | |||
129 | # default to check the entire tree | 130 | # default to check the entire tree |
130 | else: | 131 | else: |
131 | undefined = check_symbols() | 132 | undefined = check_symbols() |
132 | for feature in undefined: | 133 | for feature in sorted(undefined): |
133 | files = undefined.get(feature) | 134 | files = sorted(undefined.get(feature)) |
135 | print "%s\t%s" % (feature, ", ".join(files)) | ||
134 | 136 | ||
135 | 137 | ||
136 | def execute(cmd): | 138 | def execute(cmd): |