Path Out of Control
Bradley Giesbrecht
pixilla at macports.org
Wed Apr 3 10:30:15 PDT 2013
On Apr 2, 2013, at 7:22 PM, Ryan Schmidt wrote:
>
> On Apr 2, 2013, at 21:00, Ryan Schmidt wrote:
>
>> The code that changes your .profile hasn't really changed in a long time. It should not have added to your .profile if the path was already set properly.
>
> The code the installer runs to set up your .profile is here, by the way:
>
> https://trac.macports.org/browser/trunk/base/portmgr/dmg/postflight?rev=92903#L241
>
> If you can see anything wrong in the code that might account for this problem, please let us know.
MacPorts installer could do something like this and ports that need to effect the users ENV could drop files in $MP_PREFIX/etc/macports/profile.d/:
$ tail -n1 ~/.bash_profile:
. /opt/local/etc/macports/profile
$
$ cat /opt/local/etc/macports:
export MP_PREFIX=/opt/local
if [ -z "${OLDPATH}" ]; then
export OLDPATH=$PATH
fi
if [ -z "${OLDMANPATH}" ]; then
export OLDMANPATH=$MANPATH
fi
export PATH=$MP_PREFIX/bin:$MP_PREFIX/sbin:$OLDPATH
export MANPATH=$MP_PREFIX/share/man:$OLDMANPATH
. $MP_PREFIX/etc/macports/profile.d/*
$
$ cat /opt/local/etc/macports/profile.d/apache2:
export PATH=$MP_PREFIX/apache2/bin:$PATH
Regards,
Bradley Giesbrecht (pixilla)
More information about the macports-users
mailing list