[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/09: substitute: Gracefully handle TLS termination while fetching nari
From: |
guix-commits |
Subject: |
04/09: substitute: Gracefully handle TLS termination while fetching narinfos. |
Date: |
Mon, 27 Mar 2023 12:52:22 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit af91c2d540ef437e3f663b2c18c76dc2b94e13d2
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Mar 27 10:55:31 2023 +0200
substitute: Gracefully handle TLS termination while fetching narinfos.
Fixes <https://issues.guix.gnu.org/62476>.
* guix/substitutes.scm (call-with-connection-error-handling): Add
'gnutls-error case.
---
guix/substitutes.scm | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/guix/substitutes.scm b/guix/substitutes.scm
index 84c7be83ca..e732096933 100644
--- a/guix/substitutes.scm
+++ b/guix/substitutes.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic
Courtès <ludo@gnu.org>
+;;; Copyright © 2013-2021, 2023 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>
@@ -35,6 +35,7 @@
#:select ((open-connection-for-uri
. guix:open-connection-for-uri)
resolve-uri-reference))
+ #:autoload (gnutls) (error->string error/premature-termination)
#:use-module (guix progress)
#:use-module (ice-9 match)
#:use-module (ice-9 format)
@@ -152,6 +153,13 @@ indicates that PATH is unavailable at CACHE-URL."
(strerror
(system-error-errno `(system-error ,@args)))))
#f)
+ (('gnutls-error error proc . rest)
+ (if (eq? error error/premature-termination)
+ (begin
+ (warning (G_ "~a: TLS connection failed: in ~a: ~a~%") host
+ proc (error->string error))
+ #f)
+ (apply throw 'gnutls-error error proc rest)))
(args
(apply throw args)))))
- branch master updated (da410b45a9 -> c9af27d4ca), guix-commits, 2023/03/27
- 04/09: substitute: Gracefully handle TLS termination while fetching narinfos.,
guix-commits <=
- 05/09: gnu: hevea: Update to 2.36., guix-commits, 2023/03/27
- 01/09: services: syslog: Add 'configuration' action., guix-commits, 2023/03/27
- 06/09: syscalls: 'getxattr' throws upon error., guix-commits, 2023/03/27
- 03/09: services: ntpd: Add 'configuration' action., guix-commits, 2023/03/27
- 09/09: lint: Append "/info/refs" to git-reference-url., guix-commits, 2023/03/27
- 02/09: services: network-manager: Add 'configuration' action., guix-commits, 2023/03/27
- 07/09: lint: Prevent inlining of 'package-vulnerabilities'., guix-commits, 2023/03/27
- 08/09: gnu: Add atftp., guix-commits, 2023/03/27