GNU bug report logs -
#58273
[PATCH] installer: checks the availability of the mirror
Previous Next
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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 58273 in the body.
You can then email your comments to 58273 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#58273
; Package
guix-patches
.
(Mon, 03 Oct 2022 14:20:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
aleksandr barakin <alex <at> barak.in>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Mon, 03 Oct 2022 14:20:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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
--
wbr, aleksandr barakin aka sash-kan.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#58273
; Package
guix-patches
.
(Wed, 05 Oct 2022 11:24:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 58273 <at> debbugs.gnu.org (full text, mbox):
+1 for this. It would make guix installation via graphical installer
possible in Russia since ci.guix.gnu.org is not accessible from there
without using proxy.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#58273
; Package
guix-patches
.
(Fri, 14 Oct 2022 05:56:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 58273 <at> debbugs.gnu.org (full text, mbox):
Le Mon, 3 Oct 2022 16:55:49 +0300,
aleksandr barakin <alex <at> barak.in> a écrit :
> 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.
This sounds useful, but I don't know how to test. The patch looks good
and fairly simple to me :)
Information forwarded
to
guix-patches <at> gnu.org
:
bug#58273
; Package
guix-patches
.
(Mon, 17 Oct 2022 05:34:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 58273 <at> debbugs.gnu.org (full text, mbox):
[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)]
bug closed, send any further explanations to
58273 <at> debbugs.gnu.org and aleksandr barakin <alex <at> barak.in>
Request was from
Andrew Tropin <andrew <at> trop.in>
to
control <at> debbugs.gnu.org
.
(Mon, 17 Oct 2022 05:35:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#58273
; Package
guix-patches
.
(Mon, 17 Oct 2022 07:40:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 58273 <at> debbugs.gnu.org (full text, mbox):
Hello Andrew,
>> + (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))))
Thanks for taking care of this patch. I think the following part could
be factorized:
(define (url-alive? url)
(false-if-exception
(= (response-code
(http-request url))
200)))
also, the indentation is wrong. Could you please fix it?
Thanks,
Mathieu
Information forwarded
to
guix-patches <at> gnu.org
:
bug#58273
; Package
guix-patches
.
(Mon, 17 Oct 2022 12:52:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 58273 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 2022-10-17 09:39, Mathieu Othacehe wrote:
> Hello Andrew,
>
>>> + (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))))
>
> Thanks for taking care of this patch. I think the following part could
> be factorized:
>
> (define (url-alive? url)
> (false-if-exception
> (= (response-code
> (http-request url))
> 200)))
>
> also, the indentation is wrong. Could you please fix it?
Thank you for the idea, pushed the change.
--
Best regards,
Andrew Tropin
[signature.asc (application/pgp-signature, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 15 Nov 2022 12:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 162 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.