commit:     6f0a95daae18c8bb7c99acd1a3430651e2d6ca75
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 29 07:38:13 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jun 29 09:09:09 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f0a95da

app-editors/nano: Warn in pkg_postrm about updating EDITOR

Closes: https://bugs.gentoo.org/819342
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/26133
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-editors/nano/nano-6.3.ebuild | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/app-editors/nano/nano-6.3.ebuild b/app-editors/nano/nano-6.3.ebuild
index 9bd57c68b191..ff0fcf25cd44 100644
--- a/app-editors/nano/nano-6.3.ebuild
+++ b/app-editors/nano/nano-6.3.ebuild
@@ -91,3 +91,12 @@ src_install() {
 
        use split-usr && dosym ../../bin/nano /usr/bin/nano
 }
+
+pkg_postrm() {
+       local e
+       e=$(unset EDITOR; . "${EROOT}"/etc/profile &>/dev/null; echo 
"${EDITOR}")
+       if [[ ${e##*/} == nano ]]; then
+               ewarn "The EDITOR variable is still set to ${e}."
+               ewarn "You can update it with \"eselect editor\"."
+       fi
+}

Reply via email to