all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andrew Tropin <andrew@trop.in>
To: aleksandr barakin <alex@barak.in>, 58273@debbugs.gnu.org
Subject: [bug#58273] [PATCH] installer: checks the availability of the mirror
Date: Mon, 17 Oct 2022 09:33:17 +0400	[thread overview]
Message-ID: <87o7ub815u.fsf@trop.in> (raw)
In-Reply-To: <20221003135547.z4a6ocs7dijgb3nh@barak.in>

[-- Attachment #1: Type: text/plain, Size: 1830 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  parent reply	other threads:[~2022-10-17  5:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-03 13:55 [bug#58273] [PATCH] installer: checks the availability of the mirror aleksandr barakin
2022-10-05 10:39 ` [bug#58273] unwox via Guix-patches via
2022-10-14  5:55 ` [bug#58273] [PATCH] installer: checks the availability of the mirror Julien Lepiller
2022-10-17  5:33 ` Andrew Tropin [this message]
2022-10-17  7:39   ` Mathieu Othacehe
2022-10-17 12:51     ` Andrew Tropin

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

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

  git send-email \
    --in-reply-to=87o7ub815u.fsf@trop.in \
    --to=andrew@trop.in \
    --cc=58273@debbugs.gnu.org \
    --cc=alex@barak.in \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.