Summary: | app-editors/nano - after removing nano with emerge --depclean there was no check with eselect editor update | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | korte |
Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | eselect, floppym, gentoo, sam |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=18537 https://bugs.gentoo.org/show_bug.cgi?id=600010 https://github.com/gentoo/gentoo/pull/26133 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
korte
2021-10-21 18:15:25 UTC
This could potentially be implemented in pkg_postrm in the ebuild. Personally, I don't use "eselect editor", and would prefer NOT to have the nano ebuild invoke it automatically every time I unmerge nano. The only package attempting such a thing is sys-apps/moreutils which calls "eselect editor update" in pkg_postinst (see bug 604630). The update action will check if the currently selected target is valid (and do nothing in this case), otherwise it will go through EDITOR_LIST="nano ed emacs ex vi xemacs" in order and select the first available target. Similar for "eselect visual" where the list is "nano emacs vi xemacs". I am not entirely sure if calling it from an ebuild is a good thing. Except for listing nano first, the list doesn't express any preferences and is in alphabetical order. So, I tend to say that ebuilds shouldn't try to guess the user's preferences there, because the result may be worse than leaving the variable alone. Maybe pkg_postrm of nano could just test for [[ ${EDITOR##*/} == nano ]] and output a warning that the user needs to update the variable? (Same for ${VISUAL} I guess.) (In reply to Ulrich Müller from comment #2) > Maybe pkg_postrm of nano could just test for [[ ${EDITOR##*/} == nano ]] and > output a warning that the user needs to update the variable? (Same for > ${VISUAL} I guess.) That would be helpful. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f0a95daae18c8bb7c99acd1a3430651e2d6ca75 commit 6f0a95daae18c8bb7c99acd1a3430651e2d6ca75 Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2022-06-29 07:38:13 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-06-29 09:09:09 +0000 app-editors/nano: Warn in pkg_postrm about updating EDITOR Closes: https://bugs.gentoo.org/819342 Signed-off-by: Ulrich Müller <ulm@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/26133 Signed-off-by: Sam James <sam@gentoo.org> app-editors/nano/nano-6.3.ebuild | 9 +++++++++ 1 file changed, 9 insertions(+) |