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 6FED1158094 for ; Sun, 24 Jul 2022 20:07:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 38192E090F; Sun, 24 Jul 2022 20:07:42 +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 2029EE090F for ; Sun, 24 Jul 2022 20:07:42 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 smtp.gentoo.org (Postfix) with ESMTPS id 1E618341100 for ; Sun, 24 Jul 2022 20:07:41 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 79171543 for ; Sun, 24 Jul 2022 20:07:39 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1658693200.14da463e2c45eceda559dd3582b0cbfab5b1f849.grobian@gentoo> Subject: [gentoo-commits] proj/portage:prefix commit in: lib/portage/, bin/, bin/install-qa-check.d/ X-VCS-Repository: proj/portage X-VCS-Files: bin/install-qa-check.d/05prefix bin/phase-helpers.sh lib/portage/const.py X-VCS-Directories: bin/install-qa-check.d/ bin/ lib/portage/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: 14da463e2c45eceda559dd3582b0cbfab5b1f849 X-VCS-Branch: prefix Date: Sun, 24 Jul 2022 20:07:39 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 12a2f24b-ae6f-463b-a712-df98ff7012fd X-Archives-Hash: 6ca4eb4901e2196528839416d438f27b commit: 14da463e2c45eceda559dd3582b0cbfab5b1f849 Author: Fabian Groffen gentoo org> AuthorDate: Sun Jul 24 20:06:40 2022 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Sun Jul 24 20:06:40 2022 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=14da463e *: drop stacked-prefix feature The feature needed a patch applied in the portage ebuild, and it was only really used with WinNT building, which we do not support any more. Signed-off-by: Fabian Groffen gentoo.org> bin/install-qa-check.d/05prefix | 33 ++++----------------------------- bin/phase-helpers.sh | 16 ---------------- lib/portage/const.py | 2 -- 3 files changed, 4 insertions(+), 47 deletions(-) diff --git a/bin/install-qa-check.d/05prefix b/bin/install-qa-check.d/05prefix index dbe89ba5d..a60c63fcb 100644 --- a/bin/install-qa-check.d/05prefix +++ b/bin/install-qa-check.d/05prefix @@ -34,22 +34,9 @@ install_qa_check_prefix() { # check shebangs, bug #282539 rm -f "${T}"/non-prefix-shebangs-errs local WHITELIST=" /usr/bin/env " - # BEGIN PREFIX LOCAL: resolve path before check + # BEGIN PREFIX LOCAL: pull canonicalize call out of loop # shebang can be an absolutised path, bug #342929 local eprefix=$(canonicalize ${EPREFIX}) - # Without the stacked-prefix feature, tests using BPREFIX - # are redundant to EPREFIX, but run only if we will fail. - # Otherways, BPREFIX really is BROOT (the EAPI 7 one). - local BPREFIX=${EPREFIX} - local bprefix=${eprefix} - if has stacked-prefix ${FEATURES} && - [[ -z ${ROOT%/} ]] && - [[ ${CBUILD} == ${CHOST} ]] && - [[ ${EPREFIX} != ${BROOT-${PORTAGE_OVERRIDE_EPREFIX}} ]] && - :; then - BPREFIX=${BROOT-${PORTAGE_OVERRIDE_EPREFIX}} - bprefix=$(canonicalize ${BPREFIX}) - fi # END PREFIX LOCAL # this is hell expensive, but how else? # PREFIX LOCAL: use grep -I to skip binary files, allow POSIX space @@ -80,9 +67,7 @@ install_qa_check_prefix() { [[ $(canonicalize "/${rf#${D}}") != ${eprefix}/* ]] && continue fi # does the shebang start with ${EPREFIX}, and does it exist? - # PREFIX LOCAL: check BPREFIX also - if [[ ${line[0]} == ${EPREFIX}/* || ${line[0]} == ${eprefix}/* ]] \ - || [[ ${line[0]} == ${BPREFIX}/* || ${line[0]} == ${bprefix}/* ]] ; then + if [[ ${line[0]} == ${EPREFIX}/* || ${line[0]} == ${eprefix}/* ]] ; then if [[ ! -e ${ROOT%/}${line[0]} && ! -e ${D%/}${line[0]} ]] ; then # hmm, refers explicitly to $EPREFIX, but doesn't exist, # if it's in PATH that's wrong in any case @@ -99,25 +84,16 @@ install_qa_check_prefix() { # unprefixed shebang, is the script directly in $PATH or an init # script? if [[ ":${PATH}:${EPREFIX}/etc/init.d:" == *":${fp}:"* ]] ; then - local foundprefix="none" - if [[ -e ${EROOT%/}${line[0]} || -e ${ED%/}${line[0]} ]] ; then + if [[ -e ${EROOT}${line[0]} || -e ${ED}${line[0]} ]] ; then # is it unprefixed, but we can just fix it because an # eprefixed variant exists eqawarn "eprefixing shebang of ${fn#${D%/}/}" - foundprefix=${EPREFIX} - elif [[ -e ${BPREFIX}${line[0]} ]] ; then - # is it unprefixed, but we can just fix it because a - # bprefixed variant exists - eqawarn "bprefixing shebang of ${fn#${D%/}/}" - foundprefix=${BPREFIX} - fi - if [[ ${foundprefix} != "none" ]] ; then # statement is made idempotent on purpose, because # symlinks may point to the same target, and hence the # same real file may be sedded multiple times since we # read the shebangs in one go upfront for performance # reasons - sed -i -e '1s:^#! \?'"${line[0]}"':#!'"${foundprefix}"${line[0]}':' "${rf}" + sed -i -e '1s:^#! \?'"${line[0]}"':#!'"${EPREFIX}"${line[0]}':' "${rf}" continue else # this is definitely wrong: script in $PATH and invalid shebang @@ -130,7 +106,6 @@ install_qa_check_prefix() { has stricter ${FEATURES} && \ eqawarn "invalid shebang in ${fn#${D}}: ${line[0]}" fi - # END PREFIX LOCAL done if [[ -e "${T}"/non-prefix-shebangs-errs ]] ; then eqawarn "QA Notice: the following files use invalid (possible non-prefixed) shebangs:" diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh index c5dfcf121..481170ebb 100644 --- a/bin/phase-helpers.sh +++ b/bin/phase-helpers.sh @@ -936,22 +936,6 @@ ___best_version_and_has_version_common() { fi ;; esac - # PREFIX LOCAL: stacked-prefix feature - if ___eapi_has_prefix_variables && - has "${root_arg}" '--host-root' '-b' && - has stacked-prefix ${FEATURES} && - [[ -z ${ROOT%/} ]] && - [[ ${CBUILD} == ${CHOST} ]] && - [[ ${EPREFIX} != ${BROOT-${PORTAGE_OVERRIDE_EPREFIX}} ]] && - :; then - # When we merge into another EPREFIX, but not into some ROOT, - # and CHOST is equal to CBUILD, build tools found in EPREFIX - # perfectly work for the current build environment. - # In a "stacked prefix" we explicitly utilize this situation. - "${FUNCNAME[1]}" "${atom}" && return 0 - fi - # END PREFIX LOCAL - if [[ -n $PORTAGE_IPC_DAEMON ]] ; then cmd+=("${PORTAGE_BIN_PATH}"/ebuild-ipc "${FUNCNAME[1]}" "${root}" "${atom}") else diff --git a/lib/portage/const.py b/lib/portage/const.py index 8d07abd98..980b40b4b 100644 --- a/lib/portage/const.py +++ b/lib/portage/const.py @@ -243,8 +243,6 @@ SUPPORTED_FEATURES = frozenset( "usersync", "webrsync-gpg", "xattr", - # PREFIX LOCAL - "stacked-prefix", ) )