From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6D0F1158089 for ; Fri, 22 Sep 2023 17:28:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9EEE72BC055; Fri, 22 Sep 2023 17:28:10 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 170AD2BC013 for ; Fri, 22 Sep 2023 17:28:09 +0000 (UTC) Message-ID: <678aa655-8de8-4653-b5a0-bd0bfc6a5fc2@gentoo.org> Date: Fri, 22 Sep 2023 20:28:04 +0300 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [gentoo-dev] Re: Standard parsable format for profiles/package.mask file Content-Language: en-US To: gentoo-dev@lists.gentoo.org References: <5b5dfbfd-9c7d-a26b-65e7-9f8c5e48bb8f@gentoo.org> <87msxfjix6.fsf@gentoo.org> <878r8yjohn.fsf@gentoo.org> <871qeqjmup.fsf@gentoo.org> From: Arthur Zamarin In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------N62EYuvj7hCptztKokgrxr2f" X-Archives-Salt: 22665246-5fee-4b9e-b47b-7beed2b410de X-Archives-Hash: ac64d6a7a2132ad7ea50928242862f3a This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------N62EYuvj7hCptztKokgrxr2f Content-Type: multipart/mixed; boundary="------------8HG8iND6VCjwLsxVVy00oYzd"; protected-headers="v1" From: Arthur Zamarin To: gentoo-dev@lists.gentoo.org Message-ID: <678aa655-8de8-4653-b5a0-bd0bfc6a5fc2@gentoo.org> Subject: Re: [gentoo-dev] Re: Standard parsable format for profiles/package.mask file References: <5b5dfbfd-9c7d-a26b-65e7-9f8c5e48bb8f@gentoo.org> <87msxfjix6.fsf@gentoo.org> <878r8yjohn.fsf@gentoo.org> <871qeqjmup.fsf@gentoo.org> In-Reply-To: --------------8HG8iND6VCjwLsxVVy00oYzd Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 22/09/2023 17.50, Alex Boag-Munroe wrote: > On Fri, 22 Sept 2023 at 15:37, Sam James wrote: >> >> >> Alex Boag-Munroe writes: >> >>> Any reason for the parseable parts to not be in an established human >>> readable/editable format? e.g. the config ini style format, or TOML? >> >> The only issue really is that depending on how it's done (do we do >> it for the whole file, or just comments), it may need a new (profile) >> EAPI which will take a while to implement and deploy. >> >> If it's just for comments, then we can do it immediately though. >> >>> >>> To crib from the OP example with something configparser understands: >>> [PREAMBLE] >>> Timestamp: 2023-09-21 15:07:42+00:00 >>> Author: Arthur Zamarin >>> Justification: Very broken, no idea why packaged, need to drop ASAP. >>> The project is done with supporting this package. >>> Bugs: 667687, 667689 >>> Removal Date: 2023-10-21 >>> Packages: dev-lang/python >>> >>> The format is well documented already and simple to check for >>> validity, so any GLEP would just need to cover correct keys/values. >>> >> >> But yeah, I agree it's worth thinking about a proper format rather tha= n >> fragile text mangling going into the future. >> > Perhaps eventually it could/should be used for the whole file but as > an interim/beginning there's no reason you couldn't start with > comments: >=20 > # [PREAMBLE] > # Timestamp: 2023-09-21 15:07:42+00:00 > # Author: Arthur Zamarin > # Justification: Very broken, no idea why packaged, need to drop ASAP. > # The project is done with supporting this package. > # Bugs: 667687, 667689 > # Packages: dev-lang/python > dev-lang/python >=20 > This simply adds a pre parse step of stripping the comments then > feeding directly into configparser or probably more suitable, TOML > since TOML has better syntax for directly delivering things like a > "Packages:" key as a list. >=20 > Redoing a bunch of package.* parsing probably wasn't in scope of the > OP but I've always wondered and this felt an opportune moment to > ask/suggest :) Thanks for the idea. Yes, it was out of scope such suggestions for me originally, but thinking more about it, I take it more positively. Please let me (and others) to consider it for some days, cause this is very interesting proposal. Things to consider is how much effort it is to file in future, which format to use, etc. > -- > Ninpo >=20 --=20 Arthur Zamarin arthurzam@gentoo.org Gentoo Linux developer (Python, pkgcore stack, Arch Teams, GURU) --------------8HG8iND6VCjwLsxVVy00oYzd-- --------------N62EYuvj7hCptztKokgrxr2f Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEE/axFlFuH2ptjtO5EAqCvUD0SBQQFAmUNzqQACgkQAqCvUD0S BQTK3gf/VWbhABX1xWUi0fgDFBLH1L5TqTasMI33Zwo4o7UpAgW7g6/Th/tX/OS4 1l4WxMxRHIkcAms90BWdn3uv4cHNHp2xbZ5Th+5VDzE2A1fWTQCgihw/rxC2RklJ PRpZDOPo4AJsYZdCGXTC1iY6Jh/hjxTa/FuKRubqY+SIZ5IODwcOmFVCGtyr7rPj qpz+DtxCYwUfRP2c9mgEHttAL0QuyeGLEyb+As+kiAG9rm1BKiqhysnHbHgPbNEk DqRLEBW4thLSqL7kLuKCOWmQS8gKxk5XwgphWiMl29Ov/bVRS+zF59VCOBZkxR09 mRQ4/VXrnHeYdJkBT3I3n4+c7oV3zQ== =NTCE -----END PGP SIGNATURE----- --------------N62EYuvj7hCptztKokgrxr2f--