wiki:MacPortsRenaming

Version 1 (modified by jmpalacios (Juan Manuel Palacios), 17 years ago) (diff)

Creating dp2mp-move branch description page

Upon migrating away from the defunct OpenDarwin community, the MacPorts project also changed its name from the long standing "DarwinPorts", in order to 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 installation path.

It is the aim of the dp2mp-move branch to complete the migration to the new namespace at every single level of the MacPorts 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 using the rsync.macports.org server for source and ports distribution and updating corresponding options in configuration files of existing installations to reflect this;
  • ...

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 the project. WIth respect to installation paths, a default MacPorts installation upgraded to this branch would experience the following moves:

/Library/Tcl/darwinports1.0        ----->      /Library/Tcl/macports1.0
/opt/local/share/darwinports       ----->      /opt/local/share/macports
/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/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 a /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:

/opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate1/base
/opt/local/var/db/dports/sources/rsync.rsync.darwinports,org_dpupdate_dports

selfupdate and sync routines in this branch, however, have been upgraded to work with a much more flexible and cleaner skeleton: sources are now fetched into a /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:

/opt/local/var/macports/sources/rsync.macports.org/release/base
/opt/local/var/macports/sources/rsync.macports.org/release/ports

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:

/opt/local/var/macports/sources/rsync.macports.org/trunk/base

trunk/base being the corresponding rsync module in this case that 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 again preserving order. An example of this would look like, for a ports tree with Portfiles still in testing:

/opt/local/var/macports/sources/rsync.macports.org/testing/ports

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

/opt/local/var/macports/sources/<your_server>/module1/ports
/opt/local/var/macports/sources/<your_server>/module2/ports
/opt/local/var/macports/sources/<your_server>/module3/ports
/opt/local/var/macports/sources/<your_server>/some_other_module/base