GNU bug report logs - #58273
[PATCH] installer: checks the availability of the mirror

Previous Next

Package: guix-patches;

Reported by: aleksandr barakin <alex <at> barak.in>

Date: Mon, 3 Oct 2022 14:20:03 UTC

Severity: normal

Tags: patch

Done: Andrew Tropin <andrew <at> trop.in>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 58273 <at> debbugs.gnu.org (full text, mbox):

From: Andrew Tropin <andrew <at> trop.in>
To: aleksandr barakin <alex <at> barak.in>, 58273 <at> debbugs.gnu.org
Subject: Re: [bug#58273] [PATCH] installer: checks the availability of the
 mirror
Date: Mon, 17 Oct 2022 09:33:17 +0400
[Message part 1 (text/plain, inline)]
On 2022-10-03 16:55, aleksandr barakin wrote:

> checks the availability of the mirror bordeaux.guix.gnu.org.
>
> this allows you to start the installation if the ci.guix.gnu.org
> is unavailable.
> ---
>  gnu/installer/newt/network.scm | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/gnu/installer/newt/network.scm b/gnu/installer/newt/network.scm
> index 0477a489be..b11a55cb1f 100644
> --- a/gnu/installer/newt/network.scm
> +++ b/gnu/installer/newt/network.scm
> @@ -122,10 +122,15 @@ FULL-VALUE tentatives, spaced by 1 second."
>            (lambda _ #f))
>          (alarm 3))
>        (lambda ()
> -        (false-if-exception
> -         (= (response-code
> -             (http-request "https://ci.guix.gnu.org"))
> -            200)))
> +        (or
> +          (false-if-exception
> +            (= (response-code
> +                 (http-request "https://ci.guix.gnu.org"))
> +               200))
> +          (false-if-exception
> +            (= (response-code
> +                 (http-request "https://bordeaux.guix.gnu.org"))
> +               200))))
>        (lambda ()
>          (alarm 0))))
>  
> -- 
> 2.30.2

Ideally we should not hardcode exact mirror urls, because the image can
be built with different substitute urls.  Another possible soultion is
to add an ability to skip the check via TUI, as
/tmp/installer-assume-online probably not well-known and this step can
stop people without access to ci.guix.gnu.org from using Guix System,
seems especially true for newcommers.

Anyway, I find this patch useful and good enough to solve the problem at
least for some people (who don't have access to ci, but have it to
bordeaux), adjusted the wording and commit message, applied.

-- 
Best regards,
Andrew Tropin
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 2 years and 296 days ago.

Previous Next


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