how to use my local CPAN mirror?

Ryan Schmidt ryandesign at macports.org
Sun Jan 9 21:37:59 PST 2011


On Jan 9, 2011, at 15:46, Mark E. Perkins wrote:

> I maintain my own mirror of the CPAN.  That way I have ready access to
> whatever uninstalled Perl modules I might need when I am off-net.  I don't
> see a knob in MacPorts that allows me to point at my archive when I want to
> install p5-foo.
> 
> I can always use the cpan command for those, but I'd rather let MacPorts
> keep track of everything for me.
> 
> Did I just miss something?  Or is this not possible?

Either set the environment variable MASTER_SITE_LOCAL to the URL of your local mirror, or edit it into the master_sites.tcl file. I use the latter method, partly because I didn't know about the former until a week ago, and partly because the former assumes all distfiles are in a single directory; if they're not, you'll need to use the latter method. If you use the latter method, you'll want to be using a Subversion working copy for your ports tree instead of rsync, otherwise your changes will be wiped out next time you sync. The wiki has instructions for switching your ports tree to a Subversion working copy.




More information about the macports-users mailing list