utils/checkpackagelib: CommentsMenusPackagesOrder: fix 'menuconfig' handling
authorArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Thu, 1 Aug 2019 08:02:35 +0000 (10:02 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Thu, 1 Aug 2019 20:48:59 +0000 (22:48 +0200)
commitc62a2829209671f4f7a209a07eca6608ebd0dfa7
treebe6971229b81b2f0aa65938d1d4de10781afc43c
parentf0453de25d9ad458d5ef4da90f78124da1306424
utils/checkpackagelib: CommentsMenusPackagesOrder: fix 'menuconfig' handling

The CommentsMenusPackagesOrder check builds the 'state' to track the
depth of menus and conditions. However, a menuconfig doesn't create a
menu by itself - it is always followed by a condition that implies the
menu. As a result, when unwinding the 'state', the level will be wrong.

Fix this by checking for menu followed by a space, so it no longer
matches menuconfig. For consistency, do the same for comment and if
as well.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Jerzy Grzegorek <jerzy.m.grzegorek@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
utils/checkpackagelib/lib_config.py