In this case, we'll need to tune the ports so that it fetches the sources from the nearest (physically) server. A nearer server normally means less latency and less latency means faster connection (this may not be the whole truth but truth is in it. :p)
The port "fastest_sites" will test the latency of the server listed in /usr/ports/Mk/bsd.sites.mk and output to a file. The file is suitable to be included in /etc/make.conf which tell ports where to fetch the sources from.
Here it is how to:
- Installing "fastest_sites"
portsnap fetch update; portmanager ports-mgmt/fastest_sites -l
- Execute the command :
/usr/local/bin/fastest_sites > /usr/local/etc/ports_sites.conf
- Include the updated faster server list into /etc/make.conf :
echo ".include "/usr/local/etc/ports_sites.conf"" >> /etc/make.conf
- Proceed to install port(s) and it will download from a faster server.
- Should you want to regularly test the source servers, schedule it in cron :
e.g.
0 6 * * * /usr/local/bin/fastest_sites > /usr/local/etc/ports_sites.conf
In my case, after "fastest_sites" executed and /etc/make.conf updated on the first time, the next 300++ ports (compiling KDE4) that i compile, gets it's sources from (very)fast servers. Thus, the scheduling part is optional.
Shalom !!!
No comments:
Post a Comment