ports/128754: [port infrastructure] implement master sites randomization

Alexey Shuvaev shuvaev at physik.uni-wuerzburg.de
Tue Nov 11 07:35:57 PST 2008


On Tue, Nov 11, 2008 at 03:23:50AM +0000, RW wrote:
> On Mon, 10 Nov 2008 18:56:16 +0300 (MSK)
> Eygene Ryabinkin <rea-fbsd at codelabs.ru> wrote:
> 
> 
> > Today I was hit by the very bad connectivity with twaren.net and
> > nchc.dl.sourceforge.net (the first site in the SF mirrors list in the
> > FreeBSD ports .mk files) is hosted by Taiwan REN.  So, I decided to
> > implement simple randomization that will enable to evenly distribute
> > the downloads between SF mirrors.
> 
> 
> > ...
> > +# Need to drop a couple of initial rand() values: they tend
> > +# to be around 0.8 - 0.9, so for fairly small array lenght
> > +# they will produce identical values at the beginning.
> > +	srand(); rand(); rand(); rand(); rand();
> 
> I think it would be sensible to seed srand from a hash of something
> reproducible to make better use of caches - maybe DISTNAME+DISTVERSION.
>
Maybe I don't understand something, but is RANDOMIZE_MASTER_SITES
(see bsd.port.mk for details) not enough? It affects though all
sites, not only SF.

Just my 0.02$,
Alexey.


More information about the freebsd-ports mailing list