From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 2/2] checkpackagelib/lib_config.py: check packages alphabetical order in {Config.in, Config.in.host}
Date: Sun, 14 Jul 2019 12:04:56 +0200 [thread overview]
Message-ID: <20190714100456.GA11082@scaer> (raw)
In-Reply-To: <52067533-c74f-348b-450a-0504b71b0184@mind.be>
Arnout, Jerzy, All,
On 2019-07-14 00:27 +0200, Arnout Vandecappelle spake thusly:
> On 11/06/2019 22:49, Jerzy Grzegorek wrote:
> > Signed-off-by: Jerzy Grzegorek <jerzy.m.grzegorek@gmail.com>
>
> Applied both to master, thanks.
>
> I still made a lot of changes, though:
>
> - calculate level by counting - instead of with a static array;
> - new_package is only used locally, so don't make it a class member;
> - do indentation according to length of prefix;
> - don't split string in the middle of a line;
> - report first wrong package per menu;
> - do replace() only once;
> - add comment why we do replace().
>
> Please take a look at the end result, and if there's something you don't like,
> send a follow-up patch.
This breaks check-package, I'm afraid:
$ LC_ALL=C make check-package
find /home/ymorin/dev/buildroot/buildroot -type f \( -name '*.mk' -o -name '*.hash' -o -name 'Config.*' \) \
-exec ./utils/check-package {} +
Traceback (most recent call last):
File "./utils/check-package", line 190, in <module>
__main__()
File "./utils/check-package", line 173, in __main__
nwarnings, nlines = check_file_using_lib(fname)
File "./utils/check-package", line 142, in check_file_using_lib
nwarnings += print_warnings(cf.check_line(lineno + 1, text))
File "/home/ymorin/dev/buildroot/buildroot/utils/checkpackagelib/lib_config.py", line 90, in check_line
self.package[level] = ""
IndexError: list assignment index out of range
36465 lines processed
0 warnings generated
package/kodi/Config.in:303: Packages in: menu "Audio decoder addons",
are not alphabetically ordered;
correct order: '-', '_', digits, capitals, lowercase;
first incorrect package: kodi-audiodecoder
package/kodi/Config.in:315: Packages in: menu "Audio encoder addons",
are not alphabetically ordered;
correct order: '-', '_', digits, capitals, lowercase;
first incorrect package: kodi-audioencode
package/kodi/Config.in:326: Packages in: menu "Inputstream addons",
are not alphabetically ordered;
correct order: '-', '_', digits, capitals, lowercase;
first incorrect package: kodi-inputstream
package/kodi/Config.in:335: Packages in: menu "PVR addons",
are not alphabetically ordered;
correct order: '-', '_', digits, capitals, lowercase;
first incorrect package: kodi-pv
package/kodi/Config.in:359: Packages in: menu "Screensavers",
are not alphabetically ordered;
correct order: '-', '_', digits, capitals, lowercase;
first incorrect package: kodi-screensaver
package/kodi/Config.in:370: Packages in: menu "Visualisations",
are not alphabetically ordered;
correct order: '-', '_', digits, capitals, lowercase;
first incorrect package: kodi-visualisation
Traceback (most recent call last):
File "./utils/check-package", line 190, in <module>
__main__()
File "./utils/check-package", line 173, in __main__
nwarnings, nlines = check_file_using_lib(fname)
File "./utils/check-package", line 142, in check_file_using_lib
nwarnings += print_warnings(cf.check_line(lineno + 1, text))
File "/home/ymorin/dev/buildroot/buildroot/utils/checkpackagelib/lib_config.py", line 90, in check_line
self.package[level] = ""
IndexError: list assignment index out of range
37453 lines processed
0 warnings generated
20138 lines processed
0 warnings generated
make[1]: *** [Makefile:1201: check-package] Error 1
make: *** [Makefile:84: _all] Error 2
So, the kodi errors are all false positive: the ordering there is already
correct.
But most problematic, is the python traceback, now... :-(
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2019-07-14 10:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-11 20:49 [Buildroot] [PATCH v2 1/2] package/Config.in: fix alphabetical order Jerzy Grzegorek
2019-06-11 20:49 ` [Buildroot] [PATCH v2 2/2] checkpackagelib/lib_config.py: check packages alphabetical order in {Config.in, Config.in.host} Jerzy Grzegorek
2019-07-13 22:27 ` Arnout Vandecappelle
2019-07-14 10:04 ` Yann E. MORIN [this message]
2019-07-14 20:12 ` Jerzy Grzegorek
2019-07-14 12:34 ` [Buildroot] [PATCH v2 1/2] package/Config.in: fix alphabetical order Yann E. MORIN
2019-07-14 19:05 ` Arnout Vandecappelle
2019-07-15 7:25 ` Jerzy Grzegorek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190714100456.GA11082@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox