All the changes in the dp2mp-move branch have been released to the general user base as MacPorts 1.5.0 on 09-July-2007.


Upon migrating away from the defunct OpenDarwin community, the MacPorts project also changed its name from the long standing "DarwinPorts", in order to better reflect its aim to refocus support solely on Mac OS X.

This change brought about great mixture between the old and new names at various aspects of the project, like chosen installation paths, internal routines naming and many others, as every naming decision up to the point of migration had naturally been based on the old project name. When first moving to our new name great effort was put into updating most of the user visible stuff to the implied new namespace, but many "under the hood" things were left behind in the old namespace due to time constraints in getting MacPorts 1.4 out the door, including every single user-side installation path.

It is the aim of the dp2mp-move branch to complete the migration to the new MacPorts namespace at every single level of the project:

  • source level layout, e.g. moving base/src/darwinports1.0 to base/src/macports1.0 in svn and adapting files therein accordingly;
  • internal routines naming, e.g. renaming dportinit to mportinit and many other examples in this category;
  • installation paths, e.g. going from a ${prefix}/share/darwinports MacPorts base installation path at the host level to ${prefix}/share/macports;
  • distribution means, e.g. by moving to the server name for source and ports distribution and updating corresponding options in existing configuration files to reflect the change;
  • any other relevant aspect missing from this list...

MacPorts' new look

Needless to say, changes in this branch have major implications not only in the inner workings of MacPorts, but also on some user visible aspects of our software. WIth respect to installation paths, a default MacPorts installation upgraded to this branch would experience the following sequential moves:

/Library/Tcl/darwinports1.0              ----->     /Library/Tcl/macports1.0
/opt/local/etc/ports/ports.conf          ----->     /opt/local/etc/ports/macports.conf
/opt/local/etc/ports/dp_version          ----->     /opt/local/etc/ports/mp_version
/opt/local/etc/ports                     ----->     /opt/local/etc/macports
/opt/local/share/darwinports             ----->     /opt/local/share/macports
/opt/local/share/man/man5/ports.conf     ----->     /opt/local/share/man/man5/macports.conf
/opt/local/var/db/dports                 ----->     /opt/local/var/macports

The last entry in the list above represents an important and delicate move, since MacPorts operates inside the /opt/local/var/db/dports directory for many of its internal operations, like fetching Portfiles and building ports, among many other activities. Previously, MacPorts would fetch its own sources and the ports tree through the selfupdate and/or sync routines into an /opt/local/var/db/dports/sources/rsync.<rsync_server>_<rsync_module> skeleton, replacing dots and other characters in server/module names with _ in some parts of the resulting directory name. Therefore the most common and default paths for the rsync based MacPorts sources and ports tree would look like:


selfupdate and sync routines in this branch, however, have been upgraded and refactored to work with a much more flexible and cleaner skeleton: sources are now fetched into an /opt/local/var/macports/sources/<server>/<rsync_module> hierarchy. This may not seem like much at first, but closer inspection reveals this approach allows room to grow in every custom way users might need while also preserving a sense of order. Default paths will now look like:


Here release/base and release/ports are the new default rsync modules for both MacPorts base sources and the ports tree, respectively. This allows us, for example, to distribute trunk's base sources through a much more logical and self explanatory naming:


trunk/base being the corresponding rsync module that in this case would come to replace the old and confusing /opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate/base directory.

This new structure also allows us to distribute a new and custom ports tree under an entirely different rsync module if we so wish, while still preserving order. An example of this would look like, for a hypothetical ports tree with Portfiles still in testing:


MacPorts users catering to the varied needs of clients on large networks, who might have needs for multiple ports trees, would instantly see the benefits of this approach:


Upgrading existing installations

An upgrade target imported by the main Makefile takes care of moving everything that's "old" in an existing MacPorts installation into its new location (as detailed in the moves dialog above) before regular installation of the new sources begins. Also, among the rules in this target there are a set of sed calls that act on existing configuration files to upgrade them to the new conventions. For the new system-widw and user specific macpors.conf files (/opt/local/etc/macports/macports.conf and ~/.macports/macports.conf, respectively), these are:

  • new default path up to the configuration files is inserted, /opt/local/etc/ports ---> /opt/local/etc/macports;
  • new default path for the portdbpath variable is inserted, /opt/local/var/db/dports ---> /opt/local/var/macports;
  • new MacPorts rsync server is inserted, --->;
  • new default value for the base tree, dpupdate1/base/ ---> release/base/;
  • new value for trunk's base sources, dpupdate/base/ ---> trunk/base/ and dpupdate/base ---> trunk/base/;
  • stray quotes are removed from the value of the rsync_options key in old conf files, "-rtzv --delete --delete-after" ---> -rtzv --delete --delete-after;
  • useless --delete option is removed from the default rsync flags (--delete is implied by --delete-after);
  • comment references to the old ports.conf(5) man page are upgraded to the new macports.conf(5) page, ports.conf(5) ---> macports.conf(5);
  • remaining comments in the DarwinPorts namespace are also upgraded to the MacPorts namespace.

And for sources.conf:

  • new MacPorts rsync server, --->;
  • new default value for the ports tree, dpupdate/dports ---> release/ports/.

This takes care of selfupdate and source based existing MacPorts installations. Users installing from the pkg installer distributed through our dmgs will also experience the exact same upgrade through the included preflight script.

Last modified 14 years ago Last modified on Jan 10, 2008, 2:08:13 PM