In baselayout: https://gitweb.gentoo.org/proj/baselayout.git/commit/?id=9cac4dd130637fa2c1f1a64bf3c9d2509284e6dd "Drop support for ROOTPATH" https://gitweb.gentoo.org/proj/baselayout.git/commit/?id=277e5b9e55717873b87eb541a95f4f2ae0c60a4d "Add sbin directories to path" https://gitweb.gentoo.org/proj/baselayout.git/commit/?id=8974c87e2d0e243c0fc2503fac5b40f447fac65f "profile: don't use ROOTPATH" The last of these changes were released in baselayout-2.6 on 2018-05-28. Portage still has some code for ROOTPATH: bin/save-ebuild-env.sh: PORTAGE_SOCKS5_PROXY PREROOTPATH \ bin/save-ebuild-env.sh: ROOT ROOTPATH RPMDIR TEMP TMP TMPDIR USE_EXPAND \ lib/portage/package/ebuild/_config/special_env_vars.py: "PORTDIR", "PORTDIR_OVERLAY", "PREROOTPATH", "PYTHONDONTWRITEBYTECODE", lib/portage/package/ebuild/_config/special_env_vars.py: "ROOT", "ROOTPATH", "SYSROOT", "T", "TMP", "TMPDIR", lib/portage/package/ebuild/doebuild.py: prerootpath = [x for x in settings.get("PREROOTPATH", "").split(":") if x] lib/portage/package/ebuild/doebuild.py: rootpath = [x for x in settings.get("ROOTPATH", "").split(":") if x] lib/portage/package/ebuild/doebuild.py: rootpath_set = frozenset(rootpath) lib/portage/package/ebuild/doebuild.py: path.extend(prerootpath) lib/portage/package/ebuild/doebuild.py: # Respect order defined in ROOTPATH lib/portage/package/ebuild/doebuild.py: if x_abs not in rootpath_set: lib/portage/package/ebuild/doebuild.py: path.extend(rootpath) lib/portage/util/env_update.py: "PYTHONPATH", "ROOTPATH"]) Should most or all of this code be dropped?
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=69f2221413852630b2c231774e1f811f350fa3e6 commit 69f2221413852630b2c231774e1f811f350fa3e6 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2022-12-31 22:01:08 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2023-01-02 20:35:27 +0000 _doebuild_path: simplify logic used to set PATH Remove logic to incoporate PREROOTPATH and ROOTPATH. I'm not sure where PREROOTPATH was ever used, and ROOTPATH has been deprecated in baselayout for a while. Remove logic to add hard-coded directories like ${EPREFIX}/{,usr{,/local}/{sbin,bin}. Adding these paths is unnecessary if env.d or the calling environment have a valid PATH setting. Add logic to ignore PATH from the calling environment if PATH is set in env.d. This ensures that packages can update PATH by installing files in /etc/env.d and this will work without having to restart Portage with an updated environment. Bug: https://bugs.gentoo.org/607696 Bug: https://bugs.gentoo.org/693308 Bug: https://bugs.gentoo.org/888543 Signed-off-by: Mike Gilbert <floppym@gentoo.org> lib/portage/package/ebuild/doebuild.py | 44 +++++++++++----------------------- 1 file changed, 14 insertions(+), 30 deletions(-)
Let's leave this open until the rest of the ROOTPATH code is removed. Should probably wait a year or so before we do that.