Skip to contentSkip to conversation

utils/checkpackagelib: CommentsMenusPackagesOrder: fix order of packages checking

PATCH New Jerzy Grzegorek 2 participants 3 messages Jul 15, 2019 – Jul 16, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 utils/checkpackagelib: CommentsMenusPackagesOrder: fix order of packages checking

---
 utils/checkpackagelib/lib_config.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
utils/checkpackagelib/lib_config.py +3 -3
index f0edb9993d..a135355f9a 100644
@@ -72,8 +72,8 @@ class CommentsMenusPackagesOrder(_CheckFunction):
         return len(self.state.split('-')) - 1
 
     def check_line(self, lineno, text):
-        if text.startswith("comment") or text.startswith("if") or \
-           text.startswith("menu"):
+        if text.startswith("comment ") or text.startswith("if ") or \
+           text.startswith("menu "):
 
             if text.startswith("comment"):
                 if not self.state.endswith("-comment"):
@@ -103,7 +103,7 @@ class CommentsMenusPackagesOrder(_CheckFunction):
 
         elif text.startswith('\tsource "package/'):
             level = self.get_level()
-            new_package = text[17: -(len(self.filename)-5):]
+            new_package = text[17: -(len(self.filename)-self.filename.index("Config")+3):]
 
             # We order _ before A, so replace it with .
             new_package_ord = new_package.replace('_', '.')
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 utils/checkpackagelib: CommentsMenusPackagesOrder: fix order of packages checking

Jerzy, All,

On 2019-07-15 08:52 +0200, Jerzy Grzegorek spake thusly:

Quoted 1 line

Please provide more information in the commit log. See below...

Quoted 9 lines
---
 utils/checkpackagelib/lib_config.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
utils/checkpackagelib/lib_config.py +0 -0
index f0edb9993d..a135355f9a 100644

utils/checkpackagelib/lib_config.py class CommentsMenusPackagesOrder(_CheckFunction): · line 76

Quoted 7 lines
utils/checkpackagelib/lib_config.py +2 -2
@@ -72,8 +72,8 @@ class CommentsMenusPackagesOrder(_CheckFunction):
         return len(self.state.split('-')) - 1
 
     def check_line(self, lineno, text):
-        if text.startswith("comment") or text.startswith("if") or \
-           text.startswith("menu"):
+        if text.startswith("comment ") or text.startswith("if ") or \
+           text.startswith("menu "):

I guess this superseds Arnout's own patch?

    http://lists.busybox.net/pipermail/buildroot/2019-July/254466.html

utils/checkpackagelib/lib_config.py class CommentsMenusPackagesOrder(_CheckFunction): · line 106

Quoted 8 lines
utils/checkpackagelib/lib_config.py +1 -1
             if text.startswith("comment"):
                 if not self.state.endswith("-comment"):
@@ -103,7 +103,7 @@ class CommentsMenusPackagesOrder(_CheckFunction):
 
         elif text.startswith('\tsource "package/'):
             level = self.get_level()
-            new_package = text[17: -(len(self.filename)-5):]
+            new_package = text[17: -(len(self.filename)-self.filename.index("Config")+3):]

I fail to see how the two changes are related. This should be explained in the commit log. If they are not fixing the same thing, it should be two commits.

Regards,
Yann E. MORIN.

Quoted 9 lines
utils/checkpackagelib/lib_config.py +0 -0
             # We order _ before A, so replace it with .
             new_package_ord = new_package.replace('_', '.')
Signature · 6 lines
2.17.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 utils/checkpackagelib: CommentsMenusPackagesOrder: fix order of packages checking

Hi Yann,

Quoted 17 lines

Jerzy, All,

On 2019-07-15 08:52 +0200, Jerzy Grzegorek spake thusly:

Quoted 1 line

Please provide more information in the commit log. See below...

Quoted 11 lines
---
  utils/checkpackagelib/lib_config.py | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
utils/checkpackagelib/lib_config.py +0 -0
index f0edb9993d..a135355f9a 100644
@@ -72,8 +72,8 @@ class CommentsMenusPackagesOrder(_CheckFunction):
          return len(self.state.split('-')) - 1
 
Quoted 7 lines

utils/checkpackagelib/lib_config.py class CommentsMenusPackagesOrder(_CheckFunction): · line 76

Quoted 5 lines
utils/checkpackagelib/lib_config.py +2 -2
      def check_line(self, lineno, text):
-        if text.startswith("comment") or text.startswith("if") or \
-           text.startswith("menu"):
+        if text.startswith("comment ") or text.startswith("if ") or \
+           text.startswith("menu "):

I guess this superseds Arnout's own patch?

     http://lists.busybox.net/pipermail/buildroot/2019-July/254466.html

Ah yes, actually.
This change filters out lines starting with e.g. menuconfig ...
from those starting with
menu "...
Only lines starting with "comment ", "if " or "menu " build new state to track the depth of menus and conditions.

Quoted 5 lines
Quoted 5 lines
utils/checkpackagelib/lib_config.py +0 -0
              if text.startswith("comment"):
                  if not self.state.endswith("-comment"):
@@ -103,7 +103,7 @@ class CommentsMenusPackagesOrder(_CheckFunction):
 
Quoted 7 lines

utils/checkpackagelib/lib_config.py class CommentsMenusPackagesOrder(_CheckFunction): · line 106

Quoted 4 lines
utils/checkpackagelib/lib_config.py +1 -1
          elif text.startswith('\tsource "package/'):
              level = self.get_level()
-            new_package = text[17: -(len(self.filename)-5):]
+            new_package = text[17: -(len(self.filename)-self.filename.index("Config")+3):]

I fail to see how the two changes are related. This should be explained in the commit log. If they are not fixing the same thing, it should be two commits.

This one only took into account files: package/Config.in and package/Config.in.host .
In case of file package/kodi/Config.in packages' names in lines have been cut off to much:
\tsource "package/kodi-audiodecoder-modplug/Config.in" -> kodi-audiodecoder-mo
\tsource "package/kodi-audiodecoder-nosefart/Config.in" -> kodi-audiodecoder-nos
\tsource "package/kodi-audiodecoder-opus/Config.in" -> kodi-audiodecoder
...
and after comparing it caused an issue.
Thanks for the review.

Regards,
Jerzy

Quoted 13 lines

Regards,
Yann E. MORIN.

Quoted 9 lines
utils/checkpackagelib/lib_config.py +0 -0
              # We order _ before A, so replace it with .
              new_package_ord = new_package.replace('_', '.')
Signature · 6 lines
2.17.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot