--- /usr/lib/python2.7/site-packages/portage/util/env_update.py 2014-10-20 03:51:42.000000000 +0200 +++ /usr/lib/pypy/site-packages/portage/util/env_update.py 2016-04-02 13:45:28.751487847 +0200 @@ -9,6 +9,7 @@ import stat import sys import time +import string import portage from portage import os, _encodings, _unicode_decode, _unicode_encode @@ -334,8 +335,10 @@ penvnotice = "# THIS FILE IS AUTOMATICALLY GENERATED BY env-update.\n" penvnotice += "# DO NOT EDIT THIS FILE. CHANGES TO STARTUP PROFILES\n" cenvnotice = penvnotice[:] + fenvnotice = penvnotice[:] penvnotice += "# GO INTO /etc/profile NOT /etc/profile.env\n\n" cenvnotice += "# GO INTO /etc/csh.cshrc NOT /etc/csh.env\n\n" + fenvnotice += "# GO INTO /etc/profile NOT /etc/profile.fish\n\n" #create /etc/profile.env for bash support outfile = atomic_ofstream(os.path.join(eroot, "etc", "profile.env")) @@ -357,3 +360,15 @@ for x in env_keys: outfile.write("setenv %s '%s'\n" % (x, env[x])) outfile.close() + + #create /etc/profile.fish for fish support + outfile = atomic_ofstream(os.path.join(eroot, "etc", "profile.fish")) + outfile.write(fenvnotice) + + env_path = string.join(("'" + v + "'" for v in env["PATH"].split(":")), " ") + env_keys = [x for x in env if x != "PATH"] + env_keys.sort() + for k in env_keys: + outfile.write("set -x %s '%s'\n" % (k, env[k])) + outfile.write("set -x PATH %s $PATH\n" % env_path) + outfile.close()