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

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Mon, 22 May 2023 15:32:01 UTC

Severity: important

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: 63646 <at> debbugs.gnu.org
Cc: Josselin Poiret <dev <at> jpoiret.xyz>, Tobias Geerinckx-Rice <me <at> tobias.gr>, Simon Tournier <zimon.toutoune <at> gmail.com>, Mathieu Othacehe <othacehe <at> gnu.org>, Christopher Baines <mail <at> cbaines.net>, Ricardo Wurmus <rekado <at> elephly.net>
Subject: [bug#63646] [PATCH] substitute: If a server's nar URL is 404, try the next one(s).
Date: Mon, 22 May 2023 17:45:27 +0200
Ludovic Courtès <ludo <at> gnu.org> 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.

Ludo’.




This bug report was last modified 1 year and 361 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.