app-eselect/eselect-sh should be added as a dependency to app-shells/dash > grep SYMLINK_TARGETS /usr/share/eselect/modules/sh.eselect SYMLINK_TARGETS=( bash dash posh mksh )
No, such a dependency does not make sense.
*** Bug 650492 has been marked as a duplicate of this bug. ***
To elaborate, it is possible to use bash, dash, posh, or mksh without touching the /bin/sh symlink. Further, using eselect-sh to update the symlink is not even necessary; it can be done with the ln command directly. Conversely, it might makes sense to add a dependency like this in eselect-sh: RDEPEND="|| ( app-shells/bash app-shells/dash app-shells/posh app-shells/mksh )"
*** Bug 650494 has been marked as a duplicate of this bug. ***
Except this dependency doesn't really make any sense, given that bash is in @system for most of our profiles, so the dependency will always be satisfied.
> Further, using eselect-sh to update the symlink is not even necessary; it > can be done with the ln command directly. Using the ln command mistakes are possibile, though. A typo in the shell name in "ln -sf shell /bin/sh" can be annoying if one doesn't notice it, especially after a reboot (e.g.: you may need to boot with the single or init=/bin/shell parameter to fix the symlink), and eselect-sh can prevent you from doing such mistakes. Looking at the packages that depend on "app-eselect/eselect-vi", for example: app-editors/elvis app-editors/gvim app-editors/nvi app-editors/vile app-editors/vim app-editors/vis I don't see why, analogously, "app-eselect/eselect-sh" shouldn't be a dependency of dash, posh, and mksh. It seems consistent to me.
(In reply to Scall from comment #6) > Looking at the packages that depend on "app-eselect/eselect-vi", for example: > > app-editors/elvis > app-editors/gvim > app-editors/nvi > app-editors/vile > app-editors/vim > app-editors/vis > > I don't see why, analogously, "app-eselect/eselect-sh" shouldn't be a > dependency of dash, posh, and mksh. It seems consistent to me. Those ebuilds call "eselect vi" in pkg_postinst and pkg_postrm so the RDEPEND entry is necessary to ensure that will not fail. No ebuild calls "eselect sh", so no dependency is necessary.
The difference is that 'eselect vi' is 'officially' responsible for setting 'vi' symlink. The 'sh' symlink is instead part of the default setup, and 'eselect-sh' is just an 'extra' tool to switch it (which is not exactly 100% supported).