/etc/profile and /etc/bash/bashrc do not seem to work. When I enter the prefix (I am on Mac OS X, and my $EPREFIX is /opt/Gentoo), echo $PATH gives:
/opt/local/bin:/opt/local/sbin:/opt/Gentoo/usr/bin:/opt/Gentoo/bin:/opt/Gentoo/opt/bin:/opt/Gentoo/usr/sbin:/opt/Gentoo/sbin:/opt/Gentoo/usr/x86_64-apple-darwin10/gcc-bin/4.2.1:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/X11R6/bin:/sw/bin:/sw/sbin
Notice that the first two are doubled. But what I want is
export PATH=/opt/Gentoo/usr/bin:/opt/Gentoo/bin:/opt/Gentoo/opt/bin:/opt/Gentoo/usr/sbin:/opt/Gentoo/sbin:/opt/Gentoo/usr/x86_64-apple-darwin10/gcc-bin/4.2.1:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/X11R6/bin:/sw/bin:/sw/sbin
So where do I put this command to make it stick? As I said, putting it into /opt/Gentoo/etc/profile or /opt/Gentoo/etc/bash/bashrc (or both) does not work. Creating a file /opt/Gentoo/etc/bashrc (a copy of /opt/Gentoo/etc/bash/bashrc) or putting the export command in the startprefix script does not work either.
Edit: The problem is that /opt/Gentoo/etc/profile is not sourced, which seems like a bug to me. If I enter
Code:
. /opt/Gentoo/etc/profile
in the Prefix shell, then echo $PATH gives the correct setting.
But how do I modify the environment if I cannot use /etc/profile?