Adding a local directory for distfile fetching

Ryan Schmidt ryandesign at
Fri Jul 19 05:14:50 PDT 2013

On Jul 19, 2013, at 04:26, Vincent Habchi wrote:

> I have setup a dual macports tree, one on a removable disk, one on the main SSD of my machine. I’d like to be able to use the /opt/local/var/macports/distfiles directory store on the removable disk as a source server to install some ports on my office Mac and skip the downloading phase. Can I do that?

I have multiple MacPorts prefixes on my machines. I delete their var/macports/distfiles directories and replace them with a symlink to a central location, such as /Volumes/Data/macports/distfiles if I have a separate partition or $HOME/macports/distfiles if I don't.

On some of my machines, I run a web server and expose this directory. On other machines, I then edit mirror_sites.tcl and add the local server addresses to the macports_distfiles section, so that if one machine doesn't have a distfile, it tries to fetch it from other local machines before hitting the Internet.

More information about the macports-dev mailing list