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
}