[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/07: substitute: Retry nar download upon networking error.
From: |
guix-commits |
Subject: |
02/07: substitute: Retry nar download upon networking error. |
Date: |
Fri, 29 Mar 2024 20:05:57 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit ddc9d66f2b00f62eb35c3da819dc684ec4a50227
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Mar 29 15:58:42 2024 +0100
substitute: Retry nar download upon networking error.
This allows ‘guix substitute’ to gracefully handle errors like:
TLS error in procedure 'write_to_session_record_port': Error in the push
function
instead of exiting (“`guix substitute' died unexpectedly”).
* guix/scripts/substitute.scm (download-nar)[try-fetch]: Catch
‘network-error?’ too.
Reported-by: Ada Stevenson <adanskana@gmail.com>
Change-Id: I91b92183b0165832645ee37d50c13445f9322525
---
guix/scripts/substitute.scm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index 37cd08e289..3af0bf0019 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013-2023 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013-2024 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2018 Kyle Meyer <kyle@kyleam.com>
;;; Copyright © 2020 Christopher Baines <mail@cbaines.net>
@@ -494,7 +494,9 @@ STATUS-PORT."
(define (try-fetch choices)
(match choices
(((uri compression file-size) rest ...)
- (guard (c ((and (pair? rest) (http-get-error? c))
+ (guard (c ((and (pair? rest)
+ (or (http-get-error? c)
+ (network-error? c)))
(warning (G_ "download from '~a' failed, trying next URL~%")
(uri->string uri))
(try-fetch rest)))
- branch master updated (9dae1488a4 -> 4b23fd7adb), guix-commits, 2024/03/29
- 03/07: doc: ‘guix time-machine’ can travel to v0.16.0., guix-commits, 2024/03/29
- 01/07: channels: Autoload several modules., guix-commits, 2024/03/29
- 04/07: doc: Cross-reference virtual build machines from ‘guix time-machine’., guix-commits, 2024/03/29
- 02/07: substitute: Retry nar download upon networking error.,
guix-commits <=
- 06/07: services: postgresql: Simplify execution of ‘initdb’., guix-commits, 2024/03/29
- 05/07: services: postgresql: Don't initdb when directory exists., guix-commits, 2024/03/29
- 07/07: gnu: gerbil: Update to 0.18.1., guix-commits, 2024/03/29