Adding a local directory for distfile fetching

Vincent Habchi vince at macports.org
Fri Jul 19 08:50:29 PDT 2013


Hi Ryan,

> 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.

If I figure out your answer correctly, there is no way to directly add a file URL to the macports_distfiles section. The idea was that if the removable disk is connected and has the corresponding distfile, then we extract directly from it, else we fetch on the Internet.

Vincent



More information about the macports-dev mailing list