public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: James Le Cuirot <chewi@gentoo.org>
To: gentoo-dev <gentoo-dev@lists.gentoo.org>
Cc: James Le Cuirot <chewi@gentoo.org>
Subject: [gentoo-dev] [PATCH 2/4] acct-user.eclass: Fix for when building in a rooted prefix (EROOT)
Date: Tue,  6 Dec 2022 22:24:12 +0000	[thread overview]
Message-ID: <20221206222414.13633-2-chewi@gentoo.org> (raw)
In-Reply-To: <20221206222414.13633-1-chewi@gentoo.org>

Users are largely irrelevant for prefix, but we still don't want the
build to break.

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

diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass
index b15599c5dd6f..538cc6ae8ec3 100644
--- a/eclass/acct-user.eclass
+++ b/eclass/acct-user.eclass
@@ -200,7 +200,7 @@ eislocked() {
 		# but we also expire the account which is more clear
 		local shadow
 		if [[ -n "${ROOT}" ]]; then
-			shadow=$(grep "^$1:" "${ROOT}/etc/shadow")
+			shadow=$(grep "^$1:" "${EROOT}/etc/shadow")
 		else
 			shadow=$(getent shadow "$1")
 		fi
@@ -362,7 +362,7 @@ acct-user_pkg_preinst() {
 	fi
 
 	if [[ -n ${ROOT} ]]; then
-		opts+=( --prefix "${ROOT}" )
+		opts+=( --prefix "${EROOT}" )
 	fi
 
 	elog "Adding user ${ACCT_USER_NAME}"
@@ -431,7 +431,7 @@ acct-user_pkg_postinst() {
 	fi
 
 	if [[ -n ${ROOT} ]]; then
-		opts+=( --prefix "${ROOT}" )
+		opts+=( --prefix "${EROOT}" )
 	fi
 
 	elog "Updating user ${ACCT_USER_NAME}"
@@ -483,7 +483,7 @@ acct-user_pkg_prerm() {
 	)
 
 	if [[ -n ${ROOT} ]]; then
-		opts+=( --prefix "${ROOT}" )
+		opts+=( --prefix "${EROOT}" )
 	fi
 
 	elog "Locking user ${ACCT_USER_NAME}"
-- 
2.38.1



  reply	other threads:[~2022-12-06 22:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-06 22:24 [gentoo-dev] [PATCH 1/4] acct-group.eclass: Fix for when building in a rooted prefix (EROOT) James Le Cuirot
2022-12-06 22:24 ` James Le Cuirot [this message]
2022-12-06 22:24 ` [gentoo-dev] [PATCH 3/4] user-info.eclass: " James Le Cuirot
2022-12-06 23:57   ` Mike Gilbert
2022-12-06 22:24 ` [gentoo-dev] [PATCH 4/4] user.eclass: " James Le Cuirot
2022-12-06 23:55   ` Mike Gilbert
2022-12-06 23:54 ` [gentoo-dev] [PATCH 1/4] acct-group.eclass: " Mike Gilbert
2022-12-07  9:24   ` James Le Cuirot
2022-12-07 16:52     ` Mike Gilbert
2022-12-07 17:19       ` Fabian Groffen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221206222414.13633-2-chewi@gentoo.org \
    --to=chewi@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox