MacPorts vs Mac PATH Conflicts - Best Workaround???
LeAnne Lis
lisfolks.lists at gmail.com
Sat Nov 13 13:59:21 PST 2010
I understand that MacPorts exports /opt/local/bin and /opt/local/sbin in the
.profile to ensure its paths go to the front of the env PATH. Apparently
this is done because typically Apple has older versions of "stuff" than
MacPorts, and, of course, most MacPorts users want to use the new stuff.
What if, however, there is an instance (or two) where a user wants the Apple
version to be accessed rather than the MacPorts version? For example, I
have seen a post on the web from a person who had issues with Ruby on Rails
'til they put their MacPorts paths at the end of the PATH. I also know a
person who is wanting to use Apple's version of Perl - but the MacPorts
version was installed as a dependency for something else he uses, so now his
Apple version isn't found.
For the moment, I had him put the /opt/local parts at the end of the PATH
(renamed his .profile and placed a file with the MacPorts paths in
/etc/paths.d). I'm sure this will cause problems with his MacPorts ports,
though, since it'll try to use the Apple libraries instead.
So, I'm wondering: has anyone come up with an "elegant" way to handle
swapping PATH info as needed for situations like these?
I suppose one could create scripts for the specific version(s) they want to
use, but that seems like a pain. Or, perhaps one could create a script just
to swap the PATH as needed on the fly. Any other thoughts???
--
View this message in context: http://old.nabble.com/MacPorts-vs-Mac-PATH-Conflicts---Best-Workaround----tp30209649p30209649.html
Sent from the MacPorts - Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20101113/aabcda39/attachment.html>
More information about the macports-users
mailing list