Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] fs/common.mk: support comments in user table files
Date: Fri, 16 Oct 2015 18:30:46 +0200	[thread overview]
Message-ID: <20151016163046.GA4104@free.fr> (raw)
In-Reply-To: <87d1we3l4i.fsf@dell.be.48ers.dk>

Peter, Thomas, All,

On 2015-10-16 17:10 +0200, Peter Korsgaard spake thusly:
> >>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> 
>  > Peter, Yann,
>  > On Fri, 16 Oct 2015 16:50:19 +0200, Peter Korsgaard wrote:
>  >> The format of the users table files is non trivial, so it is sometimes handy
>  >> to add comments explaining the syntax (or simply the reason for the user)
>  >> inline in the files.
>  >> 
>  >> Support comment lines prefixed with '#' similar to shell / makedevs files and strip
>  >> those lines before passing to the mkusers script.
>  >> 
>  >> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
> 
>  > Shouldn't it the responsibility of the mkusers script to ignore such
>  > comments instead ?
> 
> It could be, but that is more work as it iterates over the (combined)
> file multiple times,

Arguably, we could read the file only once and store the lines in
variables. Then, we could do the filtering in the script.

However, that script is not supposed to be called outside of Buildroot,
so we don't really care where we do the filtering.

> and comments only really makes sense for custom
> users files (and nog <PKG>_USERS) so just stripping those lines when
> handling the custom files imho makes sense.

Still, the script could probably use a bit of love in this area...

Regards,
Yann E. MORIN.

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

  reply	other threads:[~2015-10-16 16:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-16 14:50 [Buildroot] [PATCH] fs/common.mk: support comments in user table files Peter Korsgaard
2015-10-16 15:01 ` Thomas Petazzoni
2015-10-16 15:10   ` Peter Korsgaard
2015-10-16 16:30     ` Yann E. MORIN [this message]
2015-10-17 14:34 ` Yann E. MORIN
2015-10-17 20:22   ` Peter Korsgaard
2015-10-18 15:57 ` Thomas Petazzoni

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=20151016163046.GA4104@free.fr \
    --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