unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 63646-done@debbugs.gnu.org, 63634-done@debbugs.gnu.org
Cc: Josselin Poiret <dev@jpoiret.xyz>,
	Christopher Baines <mail@cbaines.net>,
	Simon Tournier <zimon.toutoune@gmail.com>,
	Mathieu Othacehe <othacehe@gnu.org>,
	Tobias Geerinckx-Rice <me@tobias.gr>,
	Ricardo Wurmus <rekado@elephly.net>
Subject: bug#63646: [PATCH] substitute: If a server's nar URL is 404, try the next one(s).
Date: Tue, 30 May 2023 00:19:07 +0200	[thread overview]
Message-ID: <87cz2ieq78.fsf_-_@gnu.org> (raw)
In-Reply-To: <87v8gkv088.fsf@gnu.org> ("Ludovic Courtès"'s message of "Mon, 22 May 2023 17:45:27 +0200")

Hi,

Ludovic Courtès <ludo@gnu.org> skribis:

> Ludovic Courtès <ludo@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.

Pushed as 8af9a2aa5fa2fa5b00234c1cbe12e9aff60888a0.

Ludo’.




      reply	other threads:[~2023-05-29 22:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-22 15:30 [bug#63646] [PATCH] substitute: If a server's nar URL is 404, try the next one(s) Ludovic Courtès
2023-05-22 15:45 ` Ludovic Courtès
2023-05-29 22:19   ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87cz2ieq78.fsf_-_@gnu.org \
    --to=ludo@gnu.org \
    --cc=63634-done@debbugs.gnu.org \
    --cc=63646-done@debbugs.gnu.org \
    --cc=dev@jpoiret.xyz \
    --cc=mail@cbaines.net \
    --cc=me@tobias.gr \
    --cc=othacehe@gnu.org \
    --cc=rekado@elephly.net \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).