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 9B1F11581FB for ; Tue, 27 Aug 2024 15:24:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 771E7E2B63; Tue, 27 Aug 2024 15:16:44 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3A75CE2B60 for ; Tue, 27 Aug 2024 15:16:44 +0000 (UTC) From: David Seifert To: gentoo-dev@lists.gentoo.org Cc: David Seifert Subject: [gentoo-dev] [PATCH 30/50] python-utils-r1.eclass: drop support for EAPI 6 Date: Tue, 27 Aug 2024 17:15:15 +0200 Message-ID: <20240827151553.210835-30-soap@gentoo.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240827151553.210835-1-soap@gentoo.org> References: <20240827151553.210835-1-soap@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: 01801916-f96b-4a40-b9d4-291ccde6013d X-Archives-Hash: 931c8bcbeb553543450671f561903d29 Signed-off-by: David Seifert --- eclass/python-utils-r1.eclass | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 45d3da6bb98c..683f9b108aae 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -617,8 +617,8 @@ python_optimize() { # 2) skip paths which do not exist # (python2.6 complains about them verbosely) - if [[ ${f} == /* && -d ${D%/}${f} ]]; then - set -- "${D%/}${f}" "${@}" + if [[ ${f} == /* && -d ${D}${f} ]]; then + set -- "${D}${f}" "${@}" fi done < <( "${PYTHON}" - <<-EOF || die @@ -634,7 +634,7 @@ python_optimize() { local d for d; do # make sure to get a nice path without // - local instpath=${d#${D%/}} + local instpath=${d#${D}} instpath=/${instpath##/} einfo "Optimize Python modules for ${instpath}" @@ -741,7 +741,7 @@ python_newexe() { # don't use this at home, just call python_doscript() instead if [[ ${_PYTHON_REWRITE_SHEBANG} ]]; then - python_fix_shebang -q "${ED%/}/${d}/${newfn}" + python_fix_shebang -q "${ED}${d}/${newfn}" fi } @@ -872,15 +872,15 @@ python_domodule() { insinto "${d}" doins -r "${@}" || return ${?} ) - python_optimize "${ED%/}/${d}" + python_optimize "${ED}${d}" elif [[ -n ${BUILD_DIR} ]]; then local dest=${BUILD_DIR}/install${EPREFIX}/${d} mkdir -p "${dest}" || die cp -pR "${@}" "${dest}/" || die ( - cd "${dest}" && - chmod -R a+rX "${@##*/}" - ) || die + cd "${dest}" || die + chmod -R a+rX "${@##*/}" || die + ) else die "${FUNCNAME} can only be used in src_install or with BUILD_DIR set" fi @@ -1103,17 +1103,17 @@ python_fix_shebang() { fi if [[ ! ${quiet} ]]; then - einfo "Fixing shebang in ${f#${D%/}}." + einfo "Fixing shebang in ${f#${D}}." fi if [[ ! ${error} ]]; then - debug-print "${FUNCNAME}: in file ${f#${D%/}}" + debug-print "${FUNCNAME}: in file ${f#${D}}" debug-print "${FUNCNAME}: rewriting shebang: ${shebang}" sed -i -e "1s@${from}@#!${EPREFIX}/usr/bin/${EPYTHON}@" "${f}" || die any_fixed=1 else eerror "The file has incompatible shebang:" - eerror " file: ${f#${D%/}}" + eerror " file: ${f#${D}}" eerror " current shebang: ${shebang}" eerror " requested impl: ${EPYTHON}" die "${FUNCNAME}: conversion of incompatible shebang requested" @@ -1121,7 +1121,7 @@ python_fix_shebang() { done < <(find -H "${path}" -type f -print0 || die) if [[ ! ${any_fixed} ]]; then - eerror "QA error: ${FUNCNAME}, ${path#${D%/}} did not match any fixable files." + eerror "QA error: ${FUNCNAME}, ${path#${D}} did not match any fixable files." eerror "There are no Python files in specified directory." die "${FUNCNAME} did not match any fixable files" fi -- 2.46.0