Re: Re: [PATCH 0/9] Introduce esplit.eclass and port to it
Ionen Wolkens <[email protected]> Fri, 10 Jul 2026 19:59:37 -0400
| Newsgroups | gmane.linux.gentoo.devel |
|---|---|
| Message-ID | <alGHad4CzdwfzDc9@eversor> |
--Irlf9ajWZmbGgdLM Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 10, 2026 at 11:09:51PM -0000, Duncan wrote: > Sam James posted on Thu, 9 Jul 2026 22:22:09 +0100 as excerpted: >=20 > > Introduce a new eclass (esplit.eclass) and port ebuilds to it. This is > > needed to unblock a Portage release with sandboxing for the 'depend' > > phase enabled, because the uses of a heredoc replaced here always > > require a temporary file with < EAPI 9 (and with >=3D EAPI 9, they do b= ut > > for large inputs only). >=20 > Just to ask, since "with >=3D EAPI 9" has unlimited scope that could be w= ith=20 > us for awhile and the vagueness of "large" accordingly disturbs me... >=20 > Is it possible to better define "large" in "large inputs only"? >=20 > Are we talking "large" in terms of lines, characters, ...? Is it on the= =20 > order of 1K lines/characters? Just 10 (hopefully lines in that case)?=20 > 100K? GiB size? As I understand it (no expert), either the value of fnctl's F_GETPIPE_SZ determined at runtime if possible (e.g. on Linux) or PIPE_BUF at build time in bytes, which values vary depending on the operating system. On linux, this seems to be 64kiB minus 1 -- you can check with e.g.: $ strace bash -c "read <<<\$(printf '%*s' 65535 '')" 2>&1 | grep /tmp <no output, aka no tmp file used> And then we do +1... $ strace bash -c "read <<<\$(printf '%*s' 65536 '')" 2>&1 | grep /tmp newfstatat(AT_FDCWD, "/tmp" [...] (note that can test the EAPI=3D8 behaviour by setting BASH_COMPAT=3D5.0, it should make both cases report /tmp usage) In global scope we don't (and shouldn't) operate on anything overly large -- typically it's only version strings, a package name or such. Things like large crate lists are worse but they wouldn't reach 64kiB still, if they do we really should re-arrange to avoid that not just because of this. Albeit I read MacOS may go as low as 512 bytes, so I dunno how that may work out on prefix -- but not sure how/if the same type of sandboxing is used there. >=20 > And should such justification be in the eclass (in-eclass documentation,= =20 > or possibly just in the git commit comment) itself or is the series cover- > letter alone discoverable enough in terms of people "archaeologically"=20 > looking for the reason it was introduced, a decade or whatever from now? >=20 > --=20 > Duncan - List replies preferred. No HTML msgs. > "Every nonfree program has a lord, a master -- > and if you use the program, he is your master." Richard Stallman >=20 >=20 --=20 ionen --Irlf9ajWZmbGgdLM Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQFPBAABCAA5FiEEx3SLh1HBoPy/yLVYskQGsLCsQzQFAmpRh2kbFIAAAAAABAAO bWFudTIsMi41KzEuMTIsMiwyAAoJELJEBrCwrEM0R5kH+wU58IPSHQZrqmQHguHR eN1TS3z4mC6ARQiNfkmiDTQIPgeCGxWSI+tuWFs4dwBRxsaITg77f/JwmMV+BVtl oie7BM+DH2KaTWGiEm2IxAArlzbJryFu+x2ulF5t0dHEWWEsGK5PTgnTy+dk8vxq xWuJQ+KfFyFRUFWKMbnWPRzzh8yunR0RdHvE3chu0Tuj6sq6knM+/S1grC0va5Jm oeZk0eiVVcYGQld9G05nFs1mqJ55Z9SDNLjMDeV+DnJDBM4265rTrccqBf0crS0B DCyL9jyWZse8bvuqAXbUHSPZZZ6H90AP/AhULjseqNhh/sMvxHSB7lewMFQxaPmN 8IA= =ndqv -----END PGP SIGNATURE----- --Irlf9ajWZmbGgdLM--