Gentoo Archives: gentoo-dev

From: James Le Cuirot <chewi@g.o>
To: gentoo-dev <gentoo-dev@l.g.o>
Cc: James Le Cuirot <chewi@g.o>
Subject: [gentoo-dev] [PATCH 4/4] user.eclass: Fix for when building in a rooted prefix (EROOT)
Date: Tue, 06 Dec 2022 22:25:26
Message-Id: 20221206222414.13633-4-chewi@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/4] acct-group.eclass: Fix for when building in a rooted prefix (EROOT) by James Le Cuirot
1 Users are largely irrelevant for prefix, but we still don't want the
2 build to break.
3
4 I left the home and shell related bits alone, as it's less clear whether
5 these should be prefixed or not. Obviously /dev/null should not be. It's
6 slightly academic anyway, as nothing in the main repo uses this eclass
7 any more.
8
9 Signed-off-by: James Le Cuirot <chewi@g.o>
10 ---
11 eclass/user.eclass | 12 ++++++------
12 1 file changed, 6 insertions(+), 6 deletions(-)
13
14 diff --git a/eclass/user.eclass b/eclass/user.eclass
15 index 02e1074fe4d6..9daa1f807e07 100644
16 --- a/eclass/user.eclass
17 +++ b/eclass/user.eclass
18 @@ -119,7 +119,7 @@ enewuser() {
19 local opts=()
20
21 # handle for ROOT != /
22 - [[ -n ${ROOT} ]] && opts+=( --prefix "${ROOT}" )
23 + [[ -n ${ROOT} ]] && opts+=( --prefix "${EROOT}" )
24
25 # handle uid
26 local euid=${1}; shift
27 @@ -307,7 +307,7 @@ enewgroup() {
28
29 # handle different ROOT
30 local opts
31 - [[ -n ${ROOT} ]] && opts=( --prefix "${ROOT}" )
32 + [[ -n ${ROOT} ]] && opts=( --prefix "${EROOT}" )
33
34 # handle extra
35 if [[ $# -gt 0 ]] ; then
36 @@ -383,7 +383,7 @@ esethome() {
37
38 # Handle different ROOT
39 local opts
40 - [[ -n ${ROOT} ]] && opts=( --prefix "${ROOT}" )
41 + [[ -n ${ROOT} ]] && opts=( --prefix "${EROOT}" )
42
43 # handle homedir
44 local ehome=${1}; shift
45 @@ -469,7 +469,7 @@ esetshell() {
46
47 # Handle different ROOT
48 local opts
49 - [[ -n ${ROOT} ]] && opts=( --prefix "${ROOT}" )
50 + [[ -n ${ROOT} ]] && opts=( --prefix "${EROOT}" )
51
52 # handle shell
53 local eshell=${1}; shift
54 @@ -546,7 +546,7 @@ esetcomment() {
55
56 # Handle different ROOT
57 local opts
58 - [[ -n ${ROOT} ]] && opts=( --prefix "${ROOT}" )
59 + [[ -n ${ROOT} ]] && opts=( --prefix "${EROOT}" )
60
61 # handle comment
62 local ecomment=${1}; shift
63 @@ -647,7 +647,7 @@ esetgroups() {
64 elog " - Groups: ${egroups}"
65
66 # Handle different ROOT
67 - [[ -n ${ROOT} ]] && opts+=( --prefix "${ROOT}" )
68 + [[ -n ${ROOT} ]] && opts+=( --prefix "${EROOT}" )
69
70 # update the group
71 case ${CHOST} in
72 --
73 2.38.1

Replies