Subject: Re: bug#63646: [PATCH] substitute: If a server's nar URL is 404, try the next one(s).

From: Ludovic Courtès <[email-masked]>
Date: Tue, 30 May 2023 00:19:07 +0200

Hi,

Ludovic Courtès <[email-masked]> skribis:

> Ludovic Courtès <[email-masked]> skribis:
>
>> +  (define (try-fetch choices)
>> +    (match choices
>> +      (((uri compression file-size) rest ...)
>> +       (guard (c ((and (pair? rest) (network-error? c))
>> +                  (warning (G_ "download from '~a' failed, trying next URL~%")
>> +                           (uri->string uri))
>
> I realized we can change ‘network-error?’ to ‘http-get-error?’ above.
> Otherwise, we could find ourselves trying several nar URLs on the same
> server when the error is ETIMEDOUT or ECONNREFUSED, which would be a
> waste of time.

Pushed as 8af9a2aa5fa2fa5b00234c1cbe12e9aff60888a0.

Ludo’.