* [gentoo-commits] proj/portage:prefix commit in: lib/portage/, bin/, bin/install-qa-check.d/
@ 2022-07-24 20:07 Fabian Groffen
0 siblings, 0 replies; only message in thread
From: Fabian Groffen @ 2022-07-24 20:07 UTC (permalink / raw
To: gentoo-commits
commit: 14da463e2c45eceda559dd3582b0cbfab5b1f849
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 24 20:06:40 2022 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> 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 <grobian <AT> 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",
)
)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-07-24 20:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-24 20:07 [gentoo-commits] proj/portage:prefix commit in: lib/portage/, bin/, bin/install-qa-check.d/ Fabian Groffen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox