how to use my local CPAN mirror?

Mark E. Perkins mep1 at sixshooterpeaks.net
Tue Jan 11 15:18:33 PST 2011


On 2011/01/09 22:37, Ryan Schmidt wrote:
> 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.

So if I

	export MASTER_SITE_LOCAL=file:///path.to.my.cpan

MacPorts will assume that *all* distfiles are in that directory?  But my
CPAN mirror is just that, a mirror of the CPAN tree, so 'path.to.my.cpan'
doesn't even contain any useful files for p5-<whatever> ...

As for the subversion alternative, do you mean mirror_sites.tcl?  I don't
have a master_sites.tcl, but mirror_sites looks like the right kind of
content to me....

Thanks,
Mark


More information about the macports-users mailing list