Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Ricardo Martincoski <ricardo.martincoski@datacom.com.br>
Cc: James Knight <james.d.knight@live.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 0/4] support ignore-indent for check-package configs
Date: Sun, 27 Aug 2023 00:27:27 +0200	[thread overview]
Message-ID: <20230827002727.24097d99@windsurf> (raw)
In-Reply-To: <SN4P221MB068213B5F9C9C24C43CBB99AA0689@SN4P221MB0682.NAMP221.PROD.OUTLOOK.COM>

Hello Ricardo,

Since you're the main maintainer of the check-package logic, I really
would like to have your opinion about the approach taken in this patch
series. I think the feature makes sense, but I don't know if the
implementation is really in line with the philosophy of the existing
code. If you could give your opinion, it would be very useful.

Thanks!

Thomas

On Sat, 29 Apr 2023 14:12:01 -0400
James Knight <james.d.knight@live.com> wrote:

> The following series brings support for having a linter hint in
> configuration files to avoid having `check-package` warn about bad
> indentations for container-like configurations.
> 
> Buildroot ignores indentations for the root package configurations as
> well as kodi/x11r7 packages. These configurations reference other
> configurations, which makes it somewhat preferred to indent packages
> under a menu option. For example:
> 
>     menu "<category>"
>         source "package/<ref>/Config.in"
>         ...
>     endmenu
> 
> To prevent `check-package` from triggering a warning, an internal list
> inside `lib_config.py` is maintained. This is less than ideal since (1)
> it requires adjusting the library script if future "category"
> configurations are added/removed, and (2) does not provide a way for
> br2-external trees to utilize the same exceptions. For example, if a
> br2-external tree manages a `Config.in` with pending upstream packages:
> 
>     menu "Target packages (Queued upstream)"
>         source "$BR2_EXTERNAL_BAR_42_PATH/newpkg1/Config.in"
>         source "$BR2_EXTERNAL_BAR_42_PATH/newpkg2/Config.in"
>     endmenu
> 
> Utilizing Buildroot's `check-package` call on this file will generate an
> indentation warning.
> 
> What this series brings is the ability to add a `ignore-indent` flag
> into configuration scripts to avoid `check-package` from generating
> errors for select files. Continuing with the above example, adding the
> flag as follows will no longer generate an indentation error:
> 
>     # noqa: ignore-indent
>     menu "Target packages (Queued upstream)"
>         source "$BR2_EXTERNAL_BAR_42_PATH/newpkg1/Config.in"
>         source "$BR2_EXTERNAL_BAR_42_PATH/newpkg2/Config.in"
>     endmenu
> 
> This change allows dropping the internal list of configuration
> exceptions (for package/Config.in, package/Config.in.host, kodi and
> x11r7), to instead use the `ignore-indent` flag in the respective files.
> 
> James Knight (4):
>   utils/check-package: cleanup line reading
>   utils/check-package: support a file-state instance for library types
>   utils/check-package: support ignore-indent flag for configurations
>   utils/check-package: utilize ignore-indent flag for special configs
> 
>  package/Config.in                   |  2 ++
>  package/Config.in.host              |  2 ++
>  package/kodi/Config.in              |  2 ++
>  package/x11r7/Config.in             |  2 ++
>  utils/check-package                 | 30 ++++++++++++++++++---------
>  utils/checkpackagelib/base.py       |  2 +-
>  utils/checkpackagelib/lib.py        | 10 ++++-----
>  utils/checkpackagelib/lib_config.py | 32 ++++++++++++++++++++---------
>  utils/checkpackagelib/lib_hash.py   |  6 +++---
>  utils/checkpackagelib/lib_mk.py     | 22 ++++++++++----------
>  utils/checkpackagelib/lib_patch.py  |  6 +++---
>  utils/checkpackagelib/lib_sysv.py   |  4 ++--
>  utils/checkpackagelib/test_util.py  |  4 ++--
>  13 files changed, 77 insertions(+), 47 deletions(-)
> 
> --
> 2.40.1.windows.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot



-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2023-08-26 22:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-29 18:12 [Buildroot] [PATCH 0/4] support ignore-indent for check-package configs James Knight
2023-08-26 22:27 ` Thomas Petazzoni via buildroot [this message]
2023-09-03 16:09   ` Ricardo Martincoski

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=20230827002727.24097d99@windsurf \
    --to=buildroot@buildroot.org \
    --cc=james.d.knight@live.com \
    --cc=ricardo.martincoski@datacom.com.br \
    --cc=thomas.petazzoni@bootlin.com \
    /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