From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9174115800A for ; Sat, 29 Jul 2023 19:14:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1B0C3E0BFA; Sat, 29 Jul 2023 19:13:51 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DA07FE0BF6 for ; Sat, 29 Jul 2023 19:13:50 +0000 (UTC) From: James Le Cuirot To: gentoo-dev Cc: James Le Cuirot Subject: [gentoo-dev] [PATCH 2/2] python-utils-r1.eclass: Fix shebangs using ${EPYTHON}, not ${PYTHON} Date: Sat, 29 Jul 2023 20:13:33 +0100 Message-ID: <20230729191336.1751-2-chewi@gentoo.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230729191336.1751-1-chewi@gentoo.org> References: <20230729191336.1751-1-chewi@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 730e378d-93a3-4fea-8e13-a901f58eccc1 X-Archives-Hash: f2ead8b93cc4d581f56713ab7a6ef7b4 ${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 --- eclass/python-utils-r1.eclass | 4 +--- 1 file changed, 1 insertion(+), 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:" -- 2.41.0