Re: bin/isolated-functions.sh USERLAND setting

Arfrever Frehtes Taifersar Arahesis <[email protected]> Thu, 28 Jul 2022 19:57:50 +0200
Newsgroups gmane.linux.gentoo.portage.devel
Message-ID <CALaCa4yTaHXedDhjPMxwUuA8RAxLyxs2sM7pXuNEScBePHB8zQ@mail.gmail.com>
2022-07-28 17:47 UTC=E3=81=AB=E3=80=81Fabian Groffen <[email protected]>=
=E3=81=AF=E6=9B=B8=E3=81=84=E3=81=9F:
> bin/isolated-functions.sh does the following bit:
>
> if [[ -z ${USERLAND} ]] ; then
>    case $(uname -s) in
>    *BSD|DragonFly)
>        export USERLAND=3D"BSD"
>        ;;
>    *)
>        export USERLAND=3D"GNU"
>        ;;
>    esac
> fi
>
> (after which it uses USERLAND for a single purpose, to export XARGS to
> either GNU '[g]xargs -r', or BSD 'xargs')
>
> This bit is problematic for Prefix, because Prefix may run on *BSD, but
> use USERLAND=3DGNU.

But this code starts with 'if [[ -z ${USERLAND} ]]', so it should not
be run when USERLAND=3D"GNU".

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.