[Nix-dev] Re: Re: nix-prefetch-url curl args

Eelco Dolstra e.dolstra at tudelft.nl
Thu May 27 11:16:34 CEST 2010


Hi,

On 05/26/2010 10:48 PM, Yury G. Kudryashov wrote:

>> On Thu, May 27, 2010 at 12:28:28AM +0400, Yury G. Kudryashov wrote:
>>> Lluís Batlle i Rossell wrote:
>>>
>>>> On Wed, May 26, 2010 at 09:56:57PM +0400, Yury G. Kudryashov wrote:
>>>>> Hi!
>>>>>
>>>>> What do you think about adding something like "--speed-limit 20
>>>>> --speed-time 30 --connect-timeout 15 --retry 5" to curl arguments?

What's the default connect timeout?  The curl manpage doesn't say...

>>>> That would save us from some 'ikwildwrepper, can you requeue the failed
>>>> downloads?' :)
>>> This will solve another my problem as well. Sometimes the download speed
>>> falls to zero (probably, ISP issue). This will resume download after 30
>>> seconds of zero speed instead of waiting untill I'll stop it, and
>>> restarting from the beginning.
>>>>
>>>> I'm for it.

I'm in favour of adding the `--retry', but I'm not sure whether the
--speed-limit / --speed-time is a good idea in general.  This might help on some
people's connections but make things worse for others.

>> Notice that I mostly meant 'fetchurl', while you wrote nix-prefetch-url.
> I vote for adding both to fetchurl, and nix-prefetch-url. The second one is 
> used by download-using-manifests.pl.

A somewhat more generic solution would be to have an environment variable
$NIX_CURL_FLAGS used by both fetchurl and nix-prefetch-url.  (`fetchurl' can
receive this variable by adding it to impureEnvVars.)  Then we can accomodate
everybody's flaky Internet connections :-)

-- 
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/



More information about the nix-dev mailing list