commit: 01e4a638c3decc74baa52975043bb4af89ae2c70 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> AuthorDate: Mon Aug 7 11:59:34 2023 +0000 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> CommitDate: Mon Aug 7 12:09:48 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01e4a638
Revert "python-utils-r1.eclass: Remove old EAPI hack for exporting PYTHON" This reverts commit 9e4dc068a3066434bfbfa3a0f979ec5d6d8020eb. It fixed cross-prefix but inadvertently broke regular prefix. Both were ultimately affected by the same PMS + Portage bug where BROOT was not set in pkg_preinst. This has now been fixed, but regular prefix users need to be able to update Portage without hitting the issue. Cross-prefix users are safe because the BROOT Portage can be updated without hitting the issue. Closes: https://bugs.gentoo.org/911797 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org> eclass/python-utils-r1.eclass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 27157a003ab2..690b8ba8c79b 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -338,7 +338,9 @@ _python_export() { debug-print "${FUNCNAME}: EPYTHON = ${EPYTHON}" ;; PYTHON) - export PYTHON=${BROOT}/usr/bin/${impl} + # Under EAPI 7+, this should just use ${BROOT}, but Portage + # <3.0.50 was buggy, and prefix users need this to update. + export PYTHON=${BROOT-${EPREFIX}}/usr/bin/${impl} debug-print "${FUNCNAME}: PYTHON = ${PYTHON}" ;; PYTHON_SITEDIR)
