commit:     e2fd0ed7efae55eadfe15572cb6ff0883ae42fcf
Author:     Georgy Yakovlev <ya <AT> sysdump <DOT> net>
AuthorDate: Fri Feb 24 06:27:53 2017 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Mar  3 13:12:22 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2fd0ed7

app-shells/fish: remove profile.env parser

This removes profile.env parser and
modifies postinst message advising
to use bash to launch fish.
Fixes bug 545830
Closes: https://github.com/gentoo/gentoo/pull/4072

 app-shells/fish/files/profile-env.fish | 23 -----------------------
 app-shells/fish/fish-2.5.0.ebuild      | 15 ++++-----------
 2 files changed, 4 insertions(+), 34 deletions(-)

diff --git a/app-shells/fish/files/profile-env.fish 
b/app-shells/fish/files/profile-env.fish
deleted file mode 100644
index d4852f04171..00000000000
--- a/app-shells/fish/files/profile-env.fish
+++ /dev/null
@@ -1,23 +0,0 @@
-# only apply env for login shells, as we'd like fish to
-# inherit existing shell environment without overriding it
-# using csh env, as it's cleaner and less too parse/strip
-
-if status --is-login
-       # since fish supports export via upstream provided function
-       # we can source directly, only ommiting $PATH and comments.
-       string match -r -v '^(#|setenv (PATH|ROOTPATH) )' < /etc/csh.env | 
source
-
-       # strip unneded stuff from setenv lines
-       # apply paths and cleanup
-       if [ "$EUID" = "0" ] ; or [ "$USER" = "root" ]
-               string match -r '^setenv ROOTPATH .+' < /etc/csh.env | string 
replace -ra '\'|\:' ' ' | source
-               set -gx PATH /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin 
/sbin /bin $ROOTPATH
-               set -e ROOTPATH
-       else
-               string match -r '^setenv PATH .+' < /etc/csh.env | string 
replace -ra '\'|\:' ' ' | source
-               set -gx PATH /usr/local/bin /usr/bin /bin $PATH
-       end
-
-       # re-prepend $fish_user_paths
-       __fish_reconstruct_path
-end

diff --git a/app-shells/fish/fish-2.5.0.ebuild 
b/app-shells/fish/fish-2.5.0.ebuild
index 78465a9f78a..5132a555abc 100644
--- a/app-shells/fish/fish-2.5.0.ebuild
+++ b/app-shells/fish/fish-2.5.0.ebuild
@@ -32,13 +32,6 @@ src_configure() {
                --without-included-pcre2
 }
 
-src_install() {
-       default
-
-       insinto /usr/share/fish/vendor_conf.d
-       newins "${FILESDIR}/profile-env.fish" 00-profile-env.fish
-}
-
 src_test() {
        if has_version ~${CATEGORY}/${P} ; then
                emake test
@@ -51,10 +44,10 @@ pkg_postinst() {
        elog "fish is now installed on your system."
        elog "To run fish, type 'fish' in your terminal."
        elog
-       elog "To use fish as your login shell:"
-       elog "* add the line '${EPREFIX}/bin/${PN}'"
-       elog "* to the file '${EPREFIX}/etc/shells'."
-       elog "* use the command 'chsh -s ${EPREFIX}/bin/${PN}'."
+       elog "It is advised not to set fish as a default login shell."
+       elog "see bug #545830 for more details."
+       elog "Executing fish using ~/.bashrc is an alternative"
+       elog "see https://wiki.gentoo.org/wiki/Fish#Caveats for details"
        elog
        elog "To set your colors, run 'fish_config'"
        elog "To scan your man pages for completions, run 
'fish_update_completions'"

Reply via email to