diff options
author | 2022-12-26 10:09:17 +0000 | |
---|---|---|
committer | 2022-12-28 19:11:58 +0000 | |
commit | 9fbedc2a1aa8b71daaafc4598f69d312914c191d (patch) | |
tree | d327ff865ade542e12fdb622999465f8413ccb8c | |
parent | Revert "gcc-config: set CCACHE_COMPILERCHECK to major GCC version" (diff) | |
download | gcc-config-9fbedc2a1aa8b71daaafc4598f69d312914c191d.tar.gz gcc-config-9fbedc2a1aa8b71daaafc4598f69d312914c191d.tar.bz2 gcc-config-9fbedc2a1aa8b71daaafc4598f69d312914c191d.zip |
Allow EPREFIX to be overridden for manipulating prefixed ROOT
This use case was totally broken. We need to hardcode BROOT instead, as
we don't want to source /lib/gentoo/functions.sh from ROOT.
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
-rwxr-xr-x | gcc-config | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -9,8 +9,9 @@ : ${ROOT:=/} [[ ${ROOT} != */ ]] && ROOT="${ROOT}/" [[ ${ROOT} != /* ]] && ROOT="${PWD%/}/${ROOT}" -EPREFIX="@GENTOO_EPREFIX@" -[[ ${EPREFIX} == @*@ ]] && EPREFIX="" +BROOT="@GENTOO_EPREFIX@" +[[ ${BROOT} == @*@ ]] && BROOT="" +: ${EPREFIX="${BROOT}"} EROOT="${ROOT%/}${EPREFIX}/" cd / @@ -18,7 +19,7 @@ cd / trap ":" INT QUIT TSTP argv0=${0##*/} -functions_script="${EPREFIX}/lib/gentoo/functions.sh" +functions_script="${BROOT}/lib/gentoo/functions.sh" source "${functions_script}" || { echo "${argv0}: Could not source ${functions_script}!" 1>&2 exit 1 |