aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorGravatar Jerzy Grzegorek <jerzy.m.grzegorek@gmail.com>2019-10-05 14:22:15 +0200
committerGravatar Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>2019-10-07 23:39:21 +0200
commitdd251d68e5995b7c146c9712ce25a187a25b87de (patch)
treee27528895b5ac9e5245a79bb808ed6542517ef30 /utils
parentb1c90467d8a4be273a3010fad4728115b470ccbf (diff)
downloadbuildroot-dd251d68e5995b7c146c9712ce25a187a25b87de.tar.gz
buildroot-dd251d68e5995b7c146c9712ce25a187a25b87de.tar.bz2
utils/checkpackagelib: CommentsMenusPackagesOrder: remove '-comment' state before the '-menu' one
A comment is considered an alternative delimiter like a menu. I.e., a menu that comes after a comment should not be considered a submenu of that comment. Therefore, remove the '-comment' state before adding the '-menu' one. Signed-off-by: Jerzy Grzegorek <jerzy.m.grzegorek@gmail.com> Cc: Ricardo Martincoski <ricardo.martincoski@gmail.com> Reviewed-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Diffstat (limited to 'utils')
-rw-r--r--utils/checkpackagelib/lib_config.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/utils/checkpackagelib/lib_config.py b/utils/checkpackagelib/lib_config.py
index fc0df3dd17..499660feb7 100644
--- a/utils/checkpackagelib/lib_config.py
+++ b/utils/checkpackagelib/lib_config.py
@@ -107,6 +107,9 @@ class CommentsMenusPackagesOrder(_CheckFunction):
self.state += "-if"
elif text.startswith("menu"):
+ if self.state.endswith("-comment"):
+ self.state = self.state[:-8]
+
self.state += "-menu"
self.initialize_level_elements(text)