Option for a "local mirror"?

Ryan Schmidt ryandesign at macports.org
Sat Jan 1 17:11:59 PST 2011


On Dec 22, 2010, at 23:28, Joshua Root wrote:
> On 2010-12-23 14:40 , Ryan Schmidt wrote:
>> On Dec 22, 2010, at 20:41, Joshua Root wrote:
>>> On 2010-12-23 11:20 , Marko Käning wrote:
>>>> it would be cool if one could somehow specify a local mirror. Since I am using more than only one MacPorts installation for testing purposes I'd love to have the ability to have a local mirror which would be accessed by all my different MacPorts installations prior to accessing some remote server. Does such an configuration option already exist? If not, I guess, it would be a great feature, don't you think?
>>> 
>>> Are you aware of the MASTER_SITE_LOCAL environment variable?
>> 
>> Nope, hadn't heard of it! Looks helpful, though I think my way is more flexible, as I can specify any number of local computers' URLs, and it downloads from whichever one is on and/or has the file.
> 
> You can put multiple URLs in MASTER_SITE_LOCAL (space separated).

Ok, I'm trying this variable now for the first time. It seems to look for the distfile immediately inside whatever URL I specify:

$ MASTER_SITE_LOCAL='http://example.local/distfiles/' port distfiles zlib | grep example.local
  http://example.local/distfiles/zlib-1.2.5.tar.bz2

However, as you know, our distfiles mirrors have an intermediate directory with the name of the port, or more correctly, with the dist_subdir:

$ port distfiles zlib | grep /distfiles.macports.org
  http://distfiles.macports.org/zlib/zlib-1.2.5.tar.bz2

This is the layout my existing local mirror already uses, and I don't really want to have all ports' distfiles in a single directory. Is there any way, using MASTER_SITE_LOCAL, that I can run a local mirror using the same directory layout as our public mirror servers?


Also, can we document this variable in the guide, and the others that seem to go along with it (ARCHIVE_SITE_LOCAL, PATCH_SITE_LOCAL)? As I said, I had never heard of it, despite having been involved with this project for over 4 years now.




More information about the macports-dev mailing list