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 C0E9715800C for ; Wed, 28 Dec 2022 19:12:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0A19AE09CF; Wed, 28 Dec 2022 19:12:05 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.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 E7C77E09CF for ; Wed, 28 Dec 2022 19:12:04 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 smtp.gentoo.org (Postfix) with ESMTPS id 3B5E3340FA5 for ; Wed, 28 Dec 2022 19:12:04 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C678877C for ; Wed, 28 Dec 2022 19:12:02 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1672254718.9fbedc2a1aa8b71daaafc4598f69d312914c191d.sam@gentoo> Subject: [gentoo-commits] proj/gcc-config:master commit in: / X-VCS-Repository: proj/gcc-config X-VCS-Files: gcc-config X-VCS-Directories: / X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 9fbedc2a1aa8b71daaafc4598f69d312914c191d X-VCS-Branch: master Date: Wed, 28 Dec 2022 19:12:02 +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: 53791b3c-6795-4dbe-9d3e-28c6865e8281 X-Archives-Hash: 6922ed6e3b0d4a214068bcbd7b2dcb70 commit: 9fbedc2a1aa8b71daaafc4598f69d312914c191d Author: James Le Cuirot gentoo org> AuthorDate: Mon Dec 26 10:09:17 2022 +0000 Commit: Sam James gentoo org> CommitDate: Wed Dec 28 19:11:58 2022 +0000 URL: https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=9fbedc2a 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 gentoo.org> Signed-off-by: Sam James gentoo.org> gcc-config | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gcc-config b/gcc-config index 08002fd..c5d907c 100755 --- a/gcc-config +++ b/gcc-config @@ -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