how to use my local CPAN mirror?
Ryan Schmidt
ryandesign at macports.org
Fri Jan 21 00:17:52 PST 2011
On Jan 11, 2011, at 17:18, Mark E. Perkins wrote:
> 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?
Yes.
Hm, I'm not certain if "file:///..." works. I suppose it might. In my case, I use an "http://localhost/..." URL and have my web server set up.
> 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> ...
Yes, so MASTER_SITE_LOCAL isn't going to be very useful here. I'm not sure what it's useful for at all, to be honest; see other thread:
http://lists.macosforge.org/pipermail/macports-dev/2011-January/013519.html
> 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....
Yes, I meant mirror_sites.tcl; typo.
More information about the macports-users
mailing list