public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Arthur Zamarin <arthurzam@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: glep@gentoo.org
Subject: Re: [gentoo-dev] Re: [DRAFT] GLEP 84: Standard format for package.mask files
Date: Thu, 5 Oct 2023 22:19:11 +0300	[thread overview]
Message-ID: <a58cc10a-f1e6-437f-bcd4-dce676918d2c@gentoo.org> (raw)
In-Reply-To: <ufs2oyksr@gentoo.org>


[-- Attachment #1.1: Type: text/plain, Size: 1821 bytes --]

On 05/10/2023 21.40, Ulrich Mueller wrote:
>>>>>> On Wed, 04 Oct 2023, Arthur Zamarin wrote:
> 
>> Files can decide to add some extra file documentation, in which case, the
>> entries start after the line:
> 
>>     #--- END OF EXAMPLES ---
> 
> This agrees with current package.mask, but seems rather specific.
> Instead of reinventing the wheel, maybe a "scissors line" could be used,
> i.e. a line consisting mainly of "-", ">8" and "8<", similar to the line
> used by git-mailinfo?
> 
> I'm also wondering if we shouldn't have a similar marker for the end of
> the mask entries, i.e. everything after it would be ignored. This isn't
> currently needed for package.mask, but other files in profiles have an
> Emacs local variables block or a Vim modeline at the end.
> 
> Ulrich

After fast discussion on #gentoo-dev IRC between me and ulm, we agreed
that the "scissors line" from git-mailinfo would be very overkill and
also very complicated to implement.

So we agreed on something simpler and good enough. Comment line
containing at least 5 "-" on beginning and end. As regex:

# -{5,}.*-{5,}

All lines before first occurrence of such line (except the GLEP header
to opt in) are ignored as generic comments not part of mask, and all
lines after second occurrence (if exists) are also ignored.

Those lines are optional, which does mean that implementation should
firstly filter out the ignored part (before first time if found, and
after second time if found), and only that part parse. This means
implementing it as a straight stream is much-much harder, but since the
file are never very big, I think it won't impact performance to perform
multiple text runs.

-- 
Arthur Zamarin
arthurzam@gentoo.org
Gentoo Linux developer (Python, pkgcore stack, Arch Teams, GURU)


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2023-10-05 19:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-04 18:43 [gentoo-dev] [DRAFT] GLEP 84: Standard format for package.mask files Arthur Zamarin
2023-10-05  3:12 ` Michał Górny
2023-10-05 18:49   ` Arthur Zamarin
2023-10-05 19:36     ` Ulrich Mueller
2023-10-05 19:31   ` Arthur Zamarin
2023-10-05 19:44   ` Ulrich Mueller
2023-10-05 18:40 ` [gentoo-dev] " Ulrich Mueller
2023-10-05 19:19   ` Arthur Zamarin [this message]

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=a58cc10a-f1e6-437f-bcd4-dce676918d2c@gentoo.org \
    --to=arthurzam@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=glep@gentoo.org \
    /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