aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorGravatar Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>2019-08-01 01:02:20 +0200
committerGravatar Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>2019-08-01 09:58:15 +0200
commit5603406bd1289d794a336a79da4599e48fd27b2b (patch)
treeed4d7a9b52b5d81658cefd0de3321d53bdfac113 /utils
parent34e98c379f9e7e07492a26f522ae175d103e5133 (diff)
downloadbuildroot-5603406bd1289d794a336a79da4599e48fd27b2b.tar.gz
buildroot-5603406bd1289d794a336a79da4599e48fd27b2b.tar.bz2
utils/checkpackagelib: CommentsMenusPackagesOrder: only apply to top-level
The CommentsMenusPackagesOrder test is broken in various ways for files other than package/Config.in and package/Config.in.host. Therefore, the script gives bogus errors for various other Config.in files. However, we don't really want to check those other files. Indeed, many of them have a non-alphabetical ordering for good reasons. Therefore, skip the check for files other than package/Config.in and package/Config.in.host. Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/251214899 Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Cc: Jerzy Grzegorek <jerzy.m.grzegorek@gmail.com> Cc: Yann E. MORIN <yann.morin.1998@free.fr> Acked-by: Yann E. MORIN <yann.morin.1998@free.fr>
Diffstat (limited to 'utils')
-rw-r--r--utils/checkpackagelib/lib_config.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/checkpackagelib/lib_config.py b/utils/checkpackagelib/lib_config.py
index f0edb9993d..7d7567ac67 100644
--- a/utils/checkpackagelib/lib_config.py
+++ b/utils/checkpackagelib/lib_config.py
@@ -72,6 +72,11 @@ class CommentsMenusPackagesOrder(_CheckFunction):
return len(self.state.split('-')) - 1
def check_line(self, lineno, text):
+ # We only want to force sorting for the top-level menus
+ if self.filename not in ["package/Config.in",
+ "package/Config.in.host"]:
+ return
+
if text.startswith("comment") or text.startswith("if") or \
text.startswith("menu"):