Alternative system for conflicting files

Blair Zajac blair at orcaware.com
Wed May 7 10:16:08 PDT 2008


I'm starting to see more ports that install the same binary or file, such as 
PyQt3 and PyQt4, py-pil and py25-pil, python24 and python25, xemacs and emacs, 
etc.  These prevent simultaneous installs of these packages.

MacPorts needs a alternative system so that multiple ports can be installed that 
provide the same file.

Debian systems have a system, call alternatives.  Take java, which is provided 
by 5 or so different packages.  There's /usr/bin/java which is a symlink to 
/etc/alternatives/java which is then a symlink to the real java, 
/usr/lib/jvm/java-6-sun/jre/bin/java on my system.  There's a 
update-alternatives binary which is used to update these symlinks.

http://blog.stevenkroon.com/2006/08/29/debian-update-alternatives/

We need this for MacPorts.  If we don't come up with a MacPorts solution, then 
each package that has a conflict will either result in 1) the author not 
bothering to allow simultaneous installs, which is the easy route or 2) bake 
their own solution, such as gcc_select and python_select.  The solution for 
MacPorts should be general enough to subsume gcc_select and python_select, 
allowing those scripts to become wrappers around MacPort's alternatives.

It's probably late for GSoC, but this would be a great project.

Blair



More information about the macports-dev mailing list