/etc/profile no longer have a line that's something like this: if [ "${EUID}" = 0 ] || [ "${USER}" = "root" ] ; then PATH=${ROOTPATH} fi export PATH This makes the ROOTPATH variable seemingly useless. /etc/zsh/zprofile however still assigns PATH to ROOTPATH with the following lines: if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then # Check to make sure ROOTPATH is sane before we use it. # https://bugs.gentoo.org/656400 if [[ :${ROOTPATH}: == *:/usr/sbin:* ]]; then PATH="${ROOTPATH}" fi fi export PATH unset ROOTPATH Reproducible: Always
It is intentional: https://gitweb.gentoo.org/proj/baselayout.git/commit/?id=9cac4dd130637fa2c1f1a64bf3c9d2509284e6dd commit 9cac4dd130637fa2c1f1a64bf3c9d2509284e6dd Author: William Hubbs <williamh@gentoo.org> AuthorDate: 2017-10-04 22:17:40 +0000 Commit: William Hubbs <williamh@gentoo.org> CommitDate: 2017-10-04 22:17:40 +0000 Drop support for ROOTPATH ... https://gitweb.gentoo.org/proj/baselayout.git/commit/?id=277e5b9e55717873b87eb541a95f4f2ae0c60a4d commit 277e5b9e55717873b87eb541a95f4f2ae0c60a4d Author: William Hubbs <williamh@gentoo.org> AuthorDate: 2018-05-26 18:36:31 +0000 Commit: William Hubbs <williamh@gentoo.org> CommitDate: 2018-05-26 19:35:11 +0000 Add sbin directories to path This is a partial revert of 9cac4dd130637fa2c1f1a64bf3c9d2509284e6dd. We need to have path and rootpath be the same, to allow transitioning packages before we drop rootpath. https://gitweb.gentoo.org/proj/baselayout.git/commit/?id=8974c87e2d0e243c0fc2503fac5b40f447fac65f commit 8974c87e2d0e243c0fc2503fac5b40f447fac65f Author: William Hubbs <williamh@gentoo.org> AuthorDate: 2018-05-28 18:54:32 +0000 Commit: William Hubbs <williamh@gentoo.org> CommitDate: 2018-05-28 19:21:23 +0000 profile: don't use ROOTPATH Since PATH is supposed to be the same for everyone, we can now drop the code that handles ROOTPATH.
ROOTPATH handling should be dropped from /etc/zsh/zprofile installed by app-shells/zsh: https://gitweb.gentoo.org/repo/gentoo.git/tree/app-shells/zsh/files/zprofile-4?id=57668f2a996a42dae2455fd56acfd8ae75dc1fae
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a26c773f643fcfe35288ddfc0321a7a7d51fda0c commit a26c773f643fcfe35288ddfc0321a7a7d51fda0c Author: Lars Wendler <polynomial-c@gentoo.org> AuthorDate: 2022-02-12 18:49:23 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2022-02-12 18:50:42 +0000 app-shells/zsh: Bump to version 5.8.1 Closes: https://bugs.gentoo.org/777333 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> app-shells/zsh/Manifest | 2 + app-shells/zsh/files/zprofile-4 | 4 +- app-shells/zsh/zsh-5.8.1.ebuild | 217 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 221 insertions(+), 2 deletions(-)
This closing commit still causes different behaviors between bash and zsh; bash (/etc/profile) simply unsets ROOTPATH, while zsh sets PATH to it if present. This is currently causing issues for me in gentoo prefix, where 99host only sets PATH and not ROOTPATH, so some path components are missing within the environment.