From 4ce86a9a07ee8d1ad5db85c5c8909ad4c04471b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulrich=20M=C3=BCller?= Date: Tue, 7 Jan 2025 21:51:35 +0100 Subject: [PATCH] app-editors/emacs: Call eselect with the --root option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- app-editors/emacs/emacs-18.59-r15.ebuild | 6 +++--- app-editors/emacs/emacs-26.3-r21.ebuild | 15 ++++++--------- app-editors/emacs/emacs-27.2-r19.ebuild | 15 ++++++--------- app-editors/emacs/emacs-28.2-r15.ebuild | 15 ++++++--------- app-editors/emacs/emacs-29.4-r1.ebuild | 15 ++++++--------- app-editors/emacs/emacs-30.0.91.ebuild | 15 ++++++--------- app-editors/emacs/emacs-30.0.92.ebuild | 15 ++++++--------- app-editors/emacs/emacs-30.0.93.ebuild | 15 ++++++--------- 8 files changed, 45 insertions(+), 66 deletions(-) diff --git a/app-editors/emacs/emacs-18.59-r15.ebuild b/app-editors/emacs/emacs-18.59-r15.ebuild index 7e73a99d99844..4fe9c8340b7f6 100644 --- a/app-editors/emacs/emacs-18.59-r15.ebuild +++ b/app-editors/emacs/emacs-18.59-r15.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 @@ -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 } diff --git a/app-editors/emacs/emacs-26.3-r21.ebuild b/app-editors/emacs/emacs-26.3-r21.ebuild index 7a019f707cab3..3b621cf0a6ff2 100644 --- a/app-editors/emacs/emacs-26.3-r21.ebuild +++ b/app-editors/emacs/emacs-26.3-r21.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 @@ -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 } diff --git a/app-editors/emacs/emacs-27.2-r19.ebuild b/app-editors/emacs/emacs-27.2-r19.ebuild index 38117bed7e91e..d734cfda28c50 100644 --- a/app-editors/emacs/emacs-27.2-r19.ebuild +++ b/app-editors/emacs/emacs-27.2-r19.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 @@ -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 } diff --git a/app-editors/emacs/emacs-28.2-r15.ebuild b/app-editors/emacs/emacs-28.2-r15.ebuild index 2c7d3a1e56dda..68d0d669a24c2 100644 --- a/app-editors/emacs/emacs-28.2-r15.ebuild +++ b/app-editors/emacs/emacs-28.2-r15.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 @@ -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 } diff --git a/app-editors/emacs/emacs-29.4-r1.ebuild b/app-editors/emacs/emacs-29.4-r1.ebuild index 6fb6a878891ea..ddf4d41eeb38d 100644 --- a/app-editors/emacs/emacs-29.4-r1.ebuild +++ b/app-editors/emacs/emacs-29.4-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 @@ -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 } diff --git a/app-editors/emacs/emacs-30.0.91.ebuild b/app-editors/emacs/emacs-30.0.91.ebuild index dd6905d7ea65e..ca6c6fc30c302 100644 --- a/app-editors/emacs/emacs-30.0.91.ebuild +++ b/app-editors/emacs/emacs-30.0.91.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-30.0.92.ebuild b/app-editors/emacs/emacs-30.0.92.ebuild index dd6905d7ea65e..ca6c6fc30c302 100644 --- a/app-editors/emacs/emacs-30.0.92.ebuild +++ b/app-editors/emacs/emacs-30.0.92.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-30.0.93.ebuild b/app-editors/emacs/emacs-30.0.93.ebuild index dd6905d7ea65e..ca6c6fc30c302 100644 --- a/app-editors/emacs/emacs-30.0.93.ebuild +++ b/app-editors/emacs/emacs-30.0.93.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 }