views:

382

answers:

6

I'm considering installing macports on my mac so I can have easy access to *nix dev tools/apps. However, I'm wondering if there are any risks. I'm ok with the inevitable compatibility issue from time to time (hear snow leopard + macports has issues) but I do not want the stability of my "core" mac system to be effected. I'm also curious if macports adds any significant security risks.

Appreciate the help!

+1  A: 

Its fine - I use MacPorts - it won't overwrite any of your existing apps in the Path. I've been using it for years. However, I did completely break my Mac Ports install - I now can't install or selfupdate. But its only stopped me from installing any new ports - it hasn't effected the stability of any existing ones.

Nosrama
+3  A: 

I use Darvin/MacPorts for years now. I use them extensively. Abut once a year after a significant update ports break in a way that it is easier to delete them and start anew. So that is exactly what I do. I figure that spending 2-3 hours reinstalling them is good investment considering how much time ports save handling all open source software for me. Removing ports is not a trivial tasks though unless you use this command:

sudo rm -rf \
/opt/local \
/Applications/MacPorts \
/Applications/DarwinPorts \
/Library/Tcl/macports1.0 \
/Library/Tcl/darwinports1.0 \
/Library/LaunchDaemons/org.macports.\* \
/Library/StartupItems/DarwinPortsStartup \
/Library/Receipts/MacPorts*.pkg \
/Library/Receipts/DarwinPorts*.pkg
dimus
Gah! Four years using fink (heavily!) and never had something like this happen. Come over the the side of all that is good and holy.
dmckee
It is a matter of preference. I used fink as well, but decided on ports at the end.
dimus
I feel like Fink is messier than MacPorts.
Vince
+1  A: 

MacPorts can play some funny games with your path variable, taking precedence over installed system programs that should have precedence. Stuff like python and ruby becomes kind of a mess, if there's anything that depends on some specific version. It's not typically permanent damage though. Most problems can be resolved by uninstalling macports, and reverting the path env variable.

Breton
It's quite straightforward. MacPorts installs *nearly* everything in /opt/local/ (see elsewhere for exceptions) and modifies your shell .profile to insert /opt/local/bin at the front of $PATH. The intent is to ensure that, by default, user commands installed by the various MacPorts packages get executed in preference to any Apple-supplied commands with the same name. Often that is what you want. If not, you can modify your $PATH or use an absolute path to the version you want. Be aware of the differences, though: I've been burned by an implicitly installed MacPorts rsync, for example.
Ned Deily
@Ned As you say, there's nothing to worry about *as long as you remember that MacPorts installs utilities with the same name as the system ones*. The trick is the first time it happens to you though. See my own story, and thanks for warning about rsync, I'll pay attention when I use it.
Pascal Cuoq
+6  A: 

MacPorts uses a totally different directory for its installs — /opt/local — than any normal program. I've never seen it affect the stability of a system (I'm not even sure how it would), and I've had it installed on many computers for several years.

Chuck
@Chuck re "how it would", we have stories involving rsync and tar installed by MacPorts as dependencies in the other answers to this question.
Pascal Cuoq
+2  A: 

Have you looked at the [rather long] list of tools included with the Xcode IDE? As of Snow Leopard, it includes gcc 4.0, 4,2, llvm-gcc, and Clang, for example.

When you do the installation of Xcode, there is an optional install that will populate many of the standard unix-y dev tools into /usr/bin/, etc... They are normally found in /Developer/bin/ since Xcode started to support the ability to move the dev tools.

Personally, I have a long background of Unix development, including cross-platform work, and had been an avid Fink, then MacPorts, user for years. When doing a clean install of Leopard, I never got around to installing Fink/MacPorts and haven't had a need to since.

Both MacPorts and Fink are awesome. If you do need various Unix-y goop, either one will do nicely. However, I just wanted to make sure you were aware of the fullness of Unix-y development potential that ships with Mac OS X.

(Sticking with the system tools provides a few additional advantages; your code is more accessible to others and the dev tools have been optimized / patched / fixed for optimum support of Mac OS X)

bbum
+1  A: 

I do not know about the current situation regarding this, but in the past, I have been burned in the following scenario:

  1. Apple wants to make life easy and provide compatibility to ex-Mac OS users, modifies the system version of tar to encode data forks or some other Mac-specific metadata in tar files. They consider, rightly, that it's "just another filesystem". The encoding is nothing fancy (similar to the encoding used for FAT32 filesystems) but it's a nice touch.
  2. MacPorts want to control the version of tar used when doing MacPorts-related things (perhaps fix a bug that has been present in some system-provided version), installs pristine GNU tar as a dependency for some package.
  3. MacPorts tar is first in $PATH, is used in a place where Apple tar behavior was desired.
  4. Backup is revealed to be worthless.

I am still using MacPorts though. I just pay attention at the time of using tar. MacPorts is such a big timesaver that I couldn't do without it.

Pascal Cuoq