From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1706286-garchives=archives.gentoo.org@lists.gentoo.org>
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 (4096 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id A317F15812D
	for <garchives@archives.gentoo.org>; Sun, 05 Jan 2025 21:18:16 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id C8D9CE0636;
	Sun, 05 Jan 2025 21:18:15 +0000 (UTC)
Received: from smtp.gentoo.org (dev.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 B08C7E0636
	for <gentoo-commits@lists.gentoo.org>; Sun, 05 Jan 2025 21:18:15 +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) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id E5FBB340DD9
	for <gentoo-commits@lists.gentoo.org>; Sun, 05 Jan 2025 21:18:14 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 4B12F1993
	for <gentoo-commits@lists.gentoo.org>; Sun, 05 Jan 2025 21:18:13 +0000 (UTC)
From: "Ulrich Müller" <ulm@gentoo.org>
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" <ulm@gentoo.org>
Message-ID: <1736111867.8447f12de4da15d58467810e0bbb83e29a6dce13.ulm@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: app-editors/emacs/
X-VCS-Repository: repo/gentoo
X-VCS-Files: app-editors/emacs/emacs-30.0.9999-r1.ebuild app-editors/emacs/emacs-31.0.9999.ebuild
X-VCS-Directories: app-editors/emacs/
X-VCS-Committer: ulm
X-VCS-Committer-Name: Ulrich Müller
X-VCS-Revision: 8447f12de4da15d58467810e0bbb83e29a6dce13
X-VCS-Branch: master
Date: Sun, 05 Jan 2025 21:18:13 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: a2d0a712-c967-45e3-93ab-c3bc9c9f9eaf
X-Archives-Hash: e90f984ad3c080776a42e97873d92e54

commit:     8447f12de4da15d58467810e0bbb83e29a6dce13
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  5 21:03:57 2025 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Jan  5 21:17:47 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8447f12d

app-editors/emacs: Call eselect with the --root option

eselect uses the path specified either by the --root option or by
the ROOT environment variable as the target root filesystem for its
operations. Make this explicit and future-proof by calling it with
the --root option (supported since eselect-1.4.20), rather than relying
on ROOT being exported to the environment.

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 app-editors/emacs/emacs-30.0.9999-r1.ebuild | 15 ++++++---------
 app-editors/emacs/emacs-31.0.9999.ebuild    | 15 ++++++---------
 2 files changed, 12 insertions(+), 18 deletions(-)

diff --git a/app-editors/emacs/emacs-30.0.9999-r1.ebuild b/app-editors/emacs/emacs-30.0.9999-r1.ebuild
index dd6905d7ea65..ca6c6fc30c30 100644
--- a/app-editors/emacs/emacs-30.0.9999-r1.ebuild
+++ b/app-editors/emacs/emacs-30.0.9999-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -621,16 +621,13 @@ pkg_postinst() {
 	elisp-site-regen
 	readme.gentoo_print_elog
 
-	if use livecd; then
-		# force an update of the emacs symlink for the livecd/dvd,
-		# because some microemacs packages set it with USE=livecd
-		eselect emacs update
-	else
-		eselect emacs update ifunset
-	fi
+	# Force an update of the emacs symlink for the livecd/dvd,
+	# because some microemacs packages set it with USE=livecd.
+	# Otherwise, create it only when it is not yet set.
+	eselect --root="${ROOT}" emacs update $(usev !livecd ifunset)
 }
 
 pkg_postrm() {
 	elisp-site-regen
-	eselect emacs update ifunset
+	eselect --root="${ROOT}" emacs update ifunset
 }

diff --git a/app-editors/emacs/emacs-31.0.9999.ebuild b/app-editors/emacs/emacs-31.0.9999.ebuild
index ec1f01bdf898..ba1f25cdab19 100644
--- a/app-editors/emacs/emacs-31.0.9999.ebuild
+++ b/app-editors/emacs/emacs-31.0.9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -621,16 +621,13 @@ pkg_postinst() {
 	elisp-site-regen
 	readme.gentoo_print_elog
 
-	if use livecd; then
-		# force an update of the emacs symlink for the livecd/dvd,
-		# because some microemacs packages set it with USE=livecd
-		eselect emacs update
-	else
-		eselect emacs update ifunset
-	fi
+	# Force an update of the emacs symlink for the livecd/dvd,
+	# because some microemacs packages set it with USE=livecd.
+	# Otherwise, create it only when it is not yet set.
+	eselect --root="${ROOT}" emacs update $(usev !livecd ifunset)
 }
 
 pkg_postrm() {
 	elisp-site-regen
-	eselect emacs update ifunset
+	eselect --root="${ROOT}" emacs update ifunset
 }