From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 73920158030 for ; Mon, 27 Feb 2023 07:28:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 849DAE07B3; Mon, 27 Feb 2023 07:28:12 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6B6F6E07B3 for ; Mon, 27 Feb 2023 07:28:12 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 63F4E3408A2 for ; Mon, 27 Feb 2023 07:28:11 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DE4518B6 for ; Mon, 27 Feb 2023 07:28:08 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1677454715.69150409a534e24107cccc080c5650bbd12bcc8e.ulm@gentoo> Subject: [gentoo-commits] proj/eselect:master commit in: bin/, / X-VCS-Repository: proj/eselect X-VCS-Files: ChangeLog bin/eselect.in X-VCS-Directories: bin/ / X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 69150409a534e24107cccc080c5650bbd12bcc8e X-VCS-Branch: master Date: Mon, 27 Feb 2023 07:28:08 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 4563098a-ed0e-4154-8881-6d2d51cb5f12 X-Archives-Hash: 9aa2e6dda01d3f60fe4eda8e8edf5e8f commit: 69150409a534e24107cccc080c5650bbd12bcc8e Author: James Le Cuirot gentoo org> AuthorDate: Sun Feb 26 23:14:02 2023 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Sun Feb 26 23:38:35 2023 +0000 URL: https://gitweb.gentoo.org/proj/eselect.git/commit/?id=69150409 Allow EPREFIX to be overridden for manipulating prefixed ROOT * bin/eselect.in: Allow EPREFIX to be overridden for manipulating prefixed ROOT. Signed-off-by: James Le Cuirot gentoo.org> Signed-off-by: Ulrich Müller gentoo.org> ChangeLog | 5 +++++ bin/eselect.in | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6fcf0db..41d4bab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2023-02-26 James Le Cuirot + + * bin/eselect.in: Allow EPREFIX to be overridden for manipulating + prefixed ROOT. + 2022-05-01 Ulrich Müller * misc/eselect-mode.el (eselect-mode): For GNU Emacs, use diff --git a/bin/eselect.in b/bin/eselect.in index 4caa87e..6a0fdbc 100755 --- a/bin/eselect.in +++ b/bin/eselect.in @@ -41,8 +41,11 @@ ESELECT_VERSION="@VERSION@" ESELECT_BINARY_NAME="$0" ESELECT_KILL_TARGET="$$" -# Support variables for Gentoo Prefix -EPREFIX="@EPREFIX@" +# Support variables for Gentoo Prefix. BROOT is hardcoded as the +# prefix for the build host. EPREFIX defaults to the same, but can be +# overridden at runtime when building for a different prefix. +BROOT="@EPREFIX@" +: ${EPREFIX="${BROOT}"} EROOT="${ROOT%${EPREFIX:+/}}${EPREFIX}" # Remove all alias definitions. Unset functions and variables that are