Re: bin/isolated-functions.sh USERLAND setting
Fabian Groffen <[email protected]> Thu, 28 Jul 2022 20:21:45 +0200
| Newsgroups | gmane.linux.gentoo.portage.devel |
|---|---|
| Organization | Gentoo Foundation, Inc. |
| Message-ID | <[email protected]> |
--A7fzDIoXiKVI/Tjh
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On 28-07-2022 20:11:24 +0200, Fabian Groffen wrote:
> On 28-07-2022 19:57:50 +0200, Arfrever Frehtes Taifersar Arahesis wrote:
> > But this code starts with 'if [[ -z ${USERLAND} ]]', so it should not
> > be run when USERLAND=3D"GNU".
> >=20
> > USERLAND=3D"GNU" is set in make.defaults, which is parsed by Portage
> > early (at Python side) and these values are passed by Portage to
> > ebuild.sh subprocess.
>=20
> Hmmm, that would be nice, features/prefix/make.defaults includes setting
> that.
>=20
> Makes me still wonder why we do this, is it a fallback for when the
> profiles aren't available (no tree yet) or something?
>=20
> It exports XARGS, which only used in the ___parallel_xargs function.
> That function in turn is used in 2 places. So all this stuff is done to
> add -r to xargs if xargs isn't BSD xargs. Iow --no-run-if-empty, which
> is cool, but apparently not strictly necessary (fugly warning I guess at
> worst). We're already checking xargs to support --max-procs=3D, so we
> could in the same go check for support of --no-run-if-empty, and drop
> the whole XARGS thing and declutter the code quite a lot :)
Sorry, I grepped wrong. XARGS is used throughout the code, so it needs
to be initialised in isolated-functions.sh. It could be initialised by
simply probing instead of relying on uname though.
As for USERLAND, emerge-webrsync and delta-webrsync appear to use it,
but they retrieve it from portageq, so I guess USERLAND is not really
used in Portage itself.
Fabian
--=20
Fabian Groffen
Gentoo on a different level
--A7fzDIoXiKVI/Tjh
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iQEzBAABCgAdFiEELUvHd/Gtp7LaU1vuzpXahU5EQpMFAmLi07kACgkQzpXahU5E
QpMkDQf/fCx3BoW1fMIeCs00Tgp4GQWtLIN4qNbd/M801lmBtgKj2U7y0s8O96UY
WmURqTJ1J6UE+I7xrraT6p42lMArTal+PjsRJcUyPlDDr9fS1WJWmS87acJ5Ta7z
9qPBl8IhuSkV6LiESG6FD4Y3Zi7se5MyJG/fzdz8JSeS5/0l402ld2zZKbsi3vhP
5kfZxBTZ28+30HXlMVEZopPFK9Vw91DdTeq2i07i0kAPSuo2zvp7PrCrx7q1Eazf
uGxiq08L0nDQMjPuzkmAQiwhtIXr7EQW0vV17JOW9gQZ6rbzJnksx9qpLdMKPcdv
gwNdR8fIQwCL15tw85Zt1VU5iqEYtg==
=O4Rw
-----END PGP SIGNATURE-----
--A7fzDIoXiKVI/Tjh--