diff options
author | James Le Cuirot <chewi@gentoo.org> | 2023-07-29 20:06:09 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-08-02 19:21:34 +0100 |
commit | 56bf65eee17557f8c673aa4238f5744ab2794e49 (patch) | |
tree | 0439afe936a59596a1d3be8d12aea53bcd375f72 /eclass | |
parent | python-utils-r1.eclass: Remove old EAPI hack for exporting PYTHON (diff) | |
download | gentoo-56bf65eee17557f8c673aa4238f5744ab2794e49.tar.gz gentoo-56bf65eee17557f8c673aa4238f5744ab2794e49.tar.bz2 gentoo-56bf65eee17557f8c673aa4238f5744ab2794e49.zip |
python-utils-r1.eclass: Fix shebangs using ${EPYTHON}, not ${PYTHON}
${PYTHON} points to BROOT's Python because it's usually used for calling
Python during the build. This value will be wrong at runtime after
building cross-prefix.
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/python-utils-r1.eclass | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 56b1b81edd2e..2555ce12d066 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -1023,8 +1023,6 @@ python_fix_shebang() { debug-print-function ${FUNCNAME} "${@}" [[ ${EPYTHON} ]] || die "${FUNCNAME}: EPYTHON unset (pkg_setup not called?)" - local PYTHON - _python_export "${EPYTHON}" PYTHON local force quiet while [[ ${@} ]]; do @@ -1097,7 +1095,7 @@ python_fix_shebang() { if [[ ! ${error} ]]; then debug-print "${FUNCNAME}: in file ${f#${D%/}}" debug-print "${FUNCNAME}: rewriting shebang: ${shebang}" - sed -i -e "1s@${from}@#!${PYTHON}@" "${f}" || die + sed -i -e "1s@${from}@#!${EPREFIX}/usr/bin/${EPYTHON}@" "${f}" || die any_fixed=1 else eerror "The file has incompatible shebang:" |