Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-editors/nano/
Date: Wed, 29 Jun 2022 09:09:19
Message-Id: 1656493749.6f0a95daae18c8bb7c99acd1a3430651e2d6ca75.sam@gentoo
1 commit: 6f0a95daae18c8bb7c99acd1a3430651e2d6ca75
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 29 07:38:13 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 29 09:09:09 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f0a95da
7
8 app-editors/nano: Warn in pkg_postrm about updating EDITOR
9
10 Closes: https://bugs.gentoo.org/819342
11 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
12 Closes: https://github.com/gentoo/gentoo/pull/26133
13 Signed-off-by: Sam James <sam <AT> gentoo.org>
14
15 app-editors/nano/nano-6.3.ebuild | 9 +++++++++
16 1 file changed, 9 insertions(+)
17
18 diff --git a/app-editors/nano/nano-6.3.ebuild b/app-editors/nano/nano-6.3.ebuild
19 index 9bd57c68b191..ff0fcf25cd44 100644
20 --- a/app-editors/nano/nano-6.3.ebuild
21 +++ b/app-editors/nano/nano-6.3.ebuild
22 @@ -91,3 +91,12 @@ src_install() {
23
24 use split-usr && dosym ../../bin/nano /usr/bin/nano
25 }
26 +
27 +pkg_postrm() {
28 + local e
29 + e=$(unset EDITOR; . "${EROOT}"/etc/profile &>/dev/null; echo "${EDITOR}")
30 + if [[ ${e##*/} == nano ]]; then
31 + ewarn "The EDITOR variable is still set to ${e}."
32 + ewarn "You can update it with \"eselect editor\"."
33 + fi
34 +}