Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] utils/checkpackagelib: CommentsMenusPackagesOrder: only apply to top-level
@ 2019-07-31 23:02 Arnout Vandecappelle
  2019-08-01  7:30 ` Yann E. MORIN
  2019-08-10 11:05 ` Jerzy Grzegorek
  0 siblings, 2 replies; 3+ messages in thread
From: Arnout Vandecappelle @ 2019-07-31 23:02 UTC (permalink / raw)
  To: buildroot

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>
---
 utils/checkpackagelib/lib_config.py | 5 +++++
 1 file changed, 5 insertions(+)

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"):
 
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] utils/checkpackagelib: CommentsMenusPackagesOrder: only apply to top-level
  2019-07-31 23:02 [Buildroot] [PATCH] utils/checkpackagelib: CommentsMenusPackagesOrder: only apply to top-level Arnout Vandecappelle
@ 2019-08-01  7:30 ` Yann E. MORIN
  2019-08-10 11:05 ` Jerzy Grzegorek
  1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2019-08-01  7:30 UTC (permalink / raw)
  To: buildroot

Arnout, All,

On 2019-08-01 01:02 +0200, Arnout Vandecappelle (Essensium/Mind) spake thusly:
> 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

Acked-by: Yann E. MORIN <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> 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>
> ---
>  utils/checkpackagelib/lib_config.py | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> 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"):
>  
> -- 
> 2.21.0
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] utils/checkpackagelib: CommentsMenusPackagesOrder: only apply to top-level
  2019-07-31 23:02 [Buildroot] [PATCH] utils/checkpackagelib: CommentsMenusPackagesOrder: only apply to top-level Arnout Vandecappelle
  2019-08-01  7:30 ` Yann E. MORIN
@ 2019-08-10 11:05 ` Jerzy Grzegorek
  1 sibling, 0 replies; 3+ messages in thread
From: Jerzy Grzegorek @ 2019-08-10 11:05 UTC (permalink / raw)
  To: buildroot

Hi Arnout,

> 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

Sorry for the late response (holidays).

I send a patch to solve those issues.
http://lists.busybox.net/pipermail/buildroot/2019-July/254549.html

Could you please comment it ?

Regards,
Jerzy


>
> 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>
> ---
>   utils/checkpackagelib/lib_config.py | 5 +++++
>   1 file changed, 5 insertions(+)
>
> 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"):
>   

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-08-10 11:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-31 23:02 [Buildroot] [PATCH] utils/checkpackagelib: CommentsMenusPackagesOrder: only apply to top-level Arnout Vandecappelle
2019-08-01  7:30 ` Yann E. MORIN
2019-08-10 11:05 ` Jerzy Grzegorek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox