Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/eselect:master commit in: bin/, /
Date: Mon, 27 Feb 2023 07:28:13
Message-Id: 1677454715.69150409a534e24107cccc080c5650bbd12bcc8e.ulm@gentoo
1 commit: 69150409a534e24107cccc080c5650bbd12bcc8e
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 26 23:14:02 2023 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 26 23:38:35 2023 +0000
6 URL: https://gitweb.gentoo.org/proj/eselect.git/commit/?id=69150409
7
8 Allow EPREFIX to be overridden for manipulating prefixed ROOT
9
10 * bin/eselect.in: Allow EPREFIX to be overridden for manipulating
11 prefixed ROOT.
12
13 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
14 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
15
16 ChangeLog | 5 +++++
17 bin/eselect.in | 7 +++++--
18 2 files changed, 10 insertions(+), 2 deletions(-)
19
20 diff --git a/ChangeLog b/ChangeLog
21 index 6fcf0db..41d4bab 100644
22 --- a/ChangeLog
23 +++ b/ChangeLog
24 @@ -1,3 +1,8 @@
25 +2023-02-26 James Le Cuirot <chewi@g.o>
26 +
27 + * bin/eselect.in: Allow EPREFIX to be overridden for manipulating
28 + prefixed ROOT.
29 +
30 2022-05-01 Ulrich Müller <ulm@g.o>
31
32 * misc/eselect-mode.el (eselect-mode): For GNU Emacs, use
33
34 diff --git a/bin/eselect.in b/bin/eselect.in
35 index 4caa87e..6a0fdbc 100755
36 --- a/bin/eselect.in
37 +++ b/bin/eselect.in
38 @@ -41,8 +41,11 @@ ESELECT_VERSION="@VERSION@"
39 ESELECT_BINARY_NAME="$0"
40 ESELECT_KILL_TARGET="$$"
41
42 -# Support variables for Gentoo Prefix
43 -EPREFIX="@EPREFIX@"
44 +# Support variables for Gentoo Prefix. BROOT is hardcoded as the
45 +# prefix for the build host. EPREFIX defaults to the same, but can be
46 +# overridden at runtime when building for a different prefix.
47 +BROOT="@EPREFIX@"
48 +: ${EPREFIX="${BROOT}"}
49 EROOT="${ROOT%${EPREFIX:+/}}${EPREFIX}"
50
51 # Remove all alias definitions. Unset functions and variables that are