--- portage-2.2.28/pym/portage/util/env_update.py 2014-10-20 03:51:42.000000000 +0200 +++ portage-2.2.28/pym/portage/util/env_update.py 2016-04-02 13:45:28.751487847 +0200 @@ -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/fish/config.fish 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,13 @@ 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 = " ".join("'{!s}'".format(v) for v in specials["PATH"]) + for k in (x for x in env_keys if x != "PATH"): + outfile.write("set -gx {!s} '{!s}'\n".format(k, env[k])) + outfile.write("set -gx PATH {!s}\n".format(env_path)) + outfile.close()