Mailing List Archive

[PATCH 4/4] user.eclass: Fix for when building in a rooted prefix (EROOT)
Users are largely irrelevant for prefix, but we still don't want the
build to break.

I left the home and shell related bits alone, as it's less clear whether
these should be prefixed or not. Obviously /dev/null should not be. It's
slightly academic anyway, as nothing in the main repo uses this eclass
any more.

Signed-off-by: James Le Cuirot <chewi@gentoo.org>
---
eclass/user.eclass | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/eclass/user.eclass b/eclass/user.eclass
index 02e1074fe4d6..9daa1f807e07 100644
--- a/eclass/user.eclass
+++ b/eclass/user.eclass
@@ -119,7 +119,7 @@ enewuser() {
local opts=()

# handle for ROOT != /
- [[ -n ${ROOT} ]] && opts+=( --prefix "${ROOT}" )
+ [[ -n ${ROOT} ]] && opts+=( --prefix "${EROOT}" )

# handle uid
local euid=${1}; shift
@@ -307,7 +307,7 @@ enewgroup() {

# handle different ROOT
local opts
- [[ -n ${ROOT} ]] && opts=( --prefix "${ROOT}" )
+ [[ -n ${ROOT} ]] && opts=( --prefix "${EROOT}" )

# handle extra
if [[ $# -gt 0 ]] ; then
@@ -383,7 +383,7 @@ esethome() {

# Handle different ROOT
local opts
- [[ -n ${ROOT} ]] && opts=( --prefix "${ROOT}" )
+ [[ -n ${ROOT} ]] && opts=( --prefix "${EROOT}" )

# handle homedir
local ehome=${1}; shift
@@ -469,7 +469,7 @@ esetshell() {

# Handle different ROOT
local opts
- [[ -n ${ROOT} ]] && opts=( --prefix "${ROOT}" )
+ [[ -n ${ROOT} ]] && opts=( --prefix "${EROOT}" )

# handle shell
local eshell=${1}; shift
@@ -546,7 +546,7 @@ esetcomment() {

# Handle different ROOT
local opts
- [[ -n ${ROOT} ]] && opts=( --prefix "${ROOT}" )
+ [[ -n ${ROOT} ]] && opts=( --prefix "${EROOT}" )

# handle comment
local ecomment=${1}; shift
@@ -647,7 +647,7 @@ esetgroups() {
elog " - Groups: ${egroups}"

# Handle different ROOT
- [[ -n ${ROOT} ]] && opts+=( --prefix "${ROOT}" )
+ [[ -n ${ROOT} ]] && opts+=( --prefix "${EROOT}" )

# update the group
case ${CHOST} in
--
2.38.1
Re: [PATCH 4/4] user.eclass: Fix for when building in a rooted prefix (EROOT) [ In reply to ]
On Tue, Dec 6, 2022 at 5:24 PM James Le Cuirot <chewi@gentoo.org> wrote:
>
> Users are largely irrelevant for prefix, but we still don't want the
> build to break.
>
> I left the home and shell related bits alone, as it's less clear whether
> these should be prefixed or not. Obviously /dev/null should not be. It's
> slightly academic anyway, as nothing in the main repo uses this eclass
> any more.

I just deleted user.eclass, so you can probably drop this patch. :-)