Copy:
[email protected]
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------UGBnxCxHO1Ns3aCPWTZjk67R
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
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
[email protected]
Gentoo Linux developer (Python, pkgcore stack, Arch Teams, GURU)
--------------UGBnxCxHO1Ns3aCPWTZjk67R--
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCgAdFiEE/axFlFuH2ptjtO5EAqCvUD0SBQQFAmUfDC8ACgkQAqCvUD0S BQTz0Af9FgS2JEEHz5Pv+WT8XVLyKXnF1Q7n2yeWeLKU4AAB0yn0EXl3EbCtNjpm 12SPTEbQxvYD5xPDmaH5cf1O+5Vl8Xt3ydzniSUBSar5p0hShk46t5jAhJ+xVkzP ByP0pO1gWPABnVeoxh7RHyU6G96IhK4HgEi7fDlz8bDDtBkpCK7VFElHirPJlslR loM6lh0Nc0jYQB02vC0iXQ2M5RVXfSnYtS4C8cTit4rh/SJqSjulk92lbGjI6UAp AFlUzSWrT5Hs8alI9FJzHmU/hvbPhg0kuWLJAVppbMEeCr6M1xw4ZdVpiIjyj5LD 6q4bfXw0vVTW3fwMNZy891Ecr+CBCg==
=BSyR
-----END PGP SIGNATURE-----
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)