Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gcc-config:master commit in: /
Date: Wed, 28 Dec 2022 19:12:05
Message-Id: 1672254718.9fbedc2a1aa8b71daaafc4598f69d312914c191d.sam@gentoo
1 commit: 9fbedc2a1aa8b71daaafc4598f69d312914c191d
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Mon Dec 26 10:09:17 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Dec 28 19:11:58 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=9fbedc2a
7
8 Allow EPREFIX to be overridden for manipulating prefixed ROOT
9
10 This use case was totally broken. We need to hardcode BROOT instead, as
11 we don't want to source /lib/gentoo/functions.sh from ROOT.
12
13 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
14 Signed-off-by: Sam James <sam <AT> gentoo.org>
15
16 gcc-config | 7 ++++---
17 1 file changed, 4 insertions(+), 3 deletions(-)
18
19 diff --git a/gcc-config b/gcc-config
20 index 08002fd..c5d907c 100755
21 --- a/gcc-config
22 +++ b/gcc-config
23 @@ -9,8 +9,9 @@
24 : ${ROOT:=/}
25 [[ ${ROOT} != */ ]] && ROOT="${ROOT}/"
26 [[ ${ROOT} != /* ]] && ROOT="${PWD%/}/${ROOT}"
27 -EPREFIX="@GENTOO_EPREFIX@"
28 -[[ ${EPREFIX} == @*@ ]] && EPREFIX=""
29 +BROOT="@GENTOO_EPREFIX@"
30 +[[ ${BROOT} == @*@ ]] && BROOT=""
31 +: ${EPREFIX="${BROOT}"}
32 EROOT="${ROOT%/}${EPREFIX}/"
33
34 cd /
35 @@ -18,7 +19,7 @@ cd /
36 trap ":" INT QUIT TSTP
37
38 argv0=${0##*/}
39 -functions_script="${EPREFIX}/lib/gentoo/functions.sh"
40 +functions_script="${BROOT}/lib/gentoo/functions.sh"
41 source "${functions_script}" || {
42 echo "${argv0}: Could not source ${functions_script}!" 1>&2
43 exit 1