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@gentoo.org>
This commit is contained in:
Ulrich Müller
2025-01-07 21:51:35 +01:00
parent b486647af4
commit 4ce86a9a07
8 changed files with 45 additions and 66 deletions

View File

@@ -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
@@ -154,9 +154,9 @@ pkg_preinst() {
}
pkg_postinst() {
eselect emacs update ifunset
eselect --root="${ROOT}" emacs update ifunset
}
pkg_postrm() {
eselect emacs update ifunset
eselect --root="${ROOT}" emacs update ifunset
}

View File

@@ -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
@@ -365,16 +365,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
}

View File

@@ -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
@@ -438,16 +438,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
}

View File

@@ -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
@@ -544,16 +544,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
}

View File

@@ -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
@@ -634,16 +634,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
}

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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
}