From patchwork Mon Oct 3 13:55:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: aleksandr barakin X-Patchwork-Id: 6199 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7E6AB27BBEA; Mon, 3 Oct 2022 15:37:39 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 35EFC27BBE9 for ; Mon, 3 Oct 2022 15:37:39 +0100 (BST) Received: from localhost ([::1]:38976 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ofMZe-0004O8-DJ for patchwork@mira.cbaines.net; Mon, 03 Oct 2022 10:37:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofMId-0006tC-KM for guix-patches@gnu.org; Mon, 03 Oct 2022 10:20:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52409) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ofMId-0007Kt-CF for guix-patches@gnu.org; Mon, 03 Oct 2022 10:20:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ofMId-0007o6-6N for guix-patches@gnu.org; Mon, 03 Oct 2022 10:20:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58273] [PATCH] installer: checks the availability of the mirror Resent-From: aleksandr barakin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 03 Oct 2022 14:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58273 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58273@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166480676029872 (code B ref -1); Mon, 03 Oct 2022 14:20:03 +0000 Received: (at submit) by debbugs.gnu.org; 3 Oct 2022 14:19:20 +0000 Received: from localhost ([127.0.0.1]:51471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ofMHu-0007lc-Sc for submit@debbugs.gnu.org; Mon, 03 Oct 2022 10:19:20 -0400 Received: from lists.gnu.org ([209.51.188.17]:53816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ofLvZ-00075V-Jo for submit@debbugs.gnu.org; Mon, 03 Oct 2022 09:56:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48642) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofLvT-0001Li-JW for guix-patches@gnu.org; Mon, 03 Oct 2022 09:56:11 -0400 Received: from forward105p.mail.yandex.net ([2a02:6b8:0:1472:2741:0:8b7:108]:45228) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofLvM-0003z1-J4 for guix-patches@gnu.org; Mon, 03 Oct 2022 09:56:05 -0400 Received: from iva7-38cb93e4c9b7.qloud-c.yandex.net (iva7-38cb93e4c9b7.qloud-c.yandex.net [IPv6:2a02:6b8:c0c:2f93:0:640:38cb:93e4]) by forward105p.mail.yandex.net (Yandex) with ESMTP id 63FEF2FD9371 for ; Mon, 3 Oct 2022 16:55:51 +0300 (MSK) Received: by iva7-38cb93e4c9b7.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id szfGf5mdFU-tohuiVqE; Mon, 03 Oct 2022 16:55:50 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=barak.in; s=mail; t=1664805350; bh=uCrKyMktnG/GLq7OmF6Vz1AmiHZjD6jQ/atdCO5U7Xs=; h=Message-ID:Subject:To:From:Date; b=IGa3ztfYw8tiHdGIhZVNRlPTQeRP703kmuNdQvSJ4SQXvpVeXcxZzSB7P8lRYbrb5 OY5cn9HENHYOLtGPTNHtO/ELRZuh1uEk3FUgZJ6Eg7ZkQ0HwoNTHvpU+osLloVHgAQ Al7yqQ1BTg+bmqJk9e7TrBbKufpswrd1mGqUyo8c= Authentication-Results: iva7-38cb93e4c9b7.qloud-c.yandex.net; dkim=pass header.i=@barak.in Date: Mon, 3 Oct 2022 16:55:49 +0300 From: aleksandr barakin Message-ID: <20221003135547.z4a6ocs7dijgb3nh@barak.in> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) Received-SPF: pass client-ip=2a02:6b8:0:1472:2741:0:8b7:108; envelope-from=alex@barak.in; helo=forward105p.mail.yandex.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 03 Oct 2022 10:19:11 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Mon, 03 Oct 2022 10:34:24 -0400 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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))))