Message ID | 20190903211341.10341-6-jerzy.m.grzegorek@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | Improve alphabetical order checking of Config.in files | expand |
Hello, On Tue, Sep 03, 2019 at 06:13 PM, Jerzy Grzegorek wrote: If you resend, please use prefix: utils/checkpackagelib: > The comment may contain packages or if-endif block(s) but not menu(s) > of packages, so lets remove the '-comment' state before the '-menu' one. > > Signed-off-by: Jerzy Grzegorek <jerzy.m.grzegorek@gmail.com> > Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> With the prefix fixed: Reviewed-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Regards, Ricardo
diff --git a/utils/checkpackagelib/lib_config.py b/utils/checkpackagelib/lib_config.py index de5faa19a2..d8f26ef435 100644 --- a/utils/checkpackagelib/lib_config.py +++ b/utils/checkpackagelib/lib_config.py @@ -106,6 +106,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)
The comment may contain packages or if-endif block(s) but not menu(s) of packages, so lets remove the '-comment' state before the '-menu' one. Signed-off-by: Jerzy Grzegorek <jerzy.m.grzegorek@gmail.com> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> --- utils/checkpackagelib/lib_config.py | 3 +++ 1 file changed, 3 insertions(+)