summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <[email protected]>2025-02-25 16:54:10 +0100
committerLudovic Courtès <[email protected]>2025-03-05 00:28:49 +0100
commitc92fbc83d4d2a98cc15e10d1fc4d5bcc13c9af5b (patch)
tree97d28c596edccdb5f6253e682b64f1b113eda4de
parent78a204ee98eaa61263e5317a08b52052cce1e8f2 (diff)
substitutes: Tolerate GnuTLS push/pull errors when fetching narinfos.
Fixes <https://issues.guix.gnu.org/75679>. Fixes this infamous error: substitute: looking for substitutes on 'https://bordeaux.guix.gnu.org'... 0.0%guix substitute: error: TLS error in procedure 'write_to_session_record_port': Error in the push function. guix system: error: `/gnu/store/…-guix-1.4.0-32.5f6fdad/bin/guix substitute' died unexpectedly * guix/substitutes.scm (call-with-connection-error-handling): Report ‘error/push-error’ and ‘error/pull-error’ as mere warnings. Reported-by: Timo Wilken <[email protected]> Change-Id: Ibc507cb88b164cbb91dff95aa18d9974c573f7c9
-rw-r--r--guix/substitutes.scm11
1 files changed, 8 insertions, 3 deletions
diff --git a/guix/substitutes.scm b/guix/substitutes.scm
index e31b394020..7ca55788d5 100644
--- a/guix/substitutes.scm
+++ b/guix/substitutes.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013-2021, 2023-2024 Ludovic Courtès <[email protected]>
+;;; Copyright © 2013-2021, 2023-2025 Ludovic Courtès <[email protected]>
;;; Copyright © 2014 Nikita Karetnikov <[email protected]>
;;; Copyright © 2018 Kyle Meyer <[email protected]>
;;; Copyright © 2020 Christopher Baines <[email protected]>
@@ -35,7 +35,10 @@
#:select ((open-connection-for-uri
. guix:open-connection-for-uri)
resolve-uri-reference))
- #:autoload (gnutls) (error->string error/premature-termination)
+ #:autoload (gnutls) (error->string
+ error/premature-termination
+ error/pull-error
+ error/push-error)
#:use-module (guix progress)
#:use-module (ice-9 match)
#:use-module (ice-9 format)
@@ -154,7 +157,9 @@ indicates that PATH is unavailable at CACHE-URL."
(system-error-errno `(system-error ,@args)))))
#f)
(('gnutls-error error proc . rest)
- (if (eq? error error/premature-termination)
+ (if (memq error (list error/premature-termination
+ error/pull-error
+ error/push-error))
(begin
(warning (G_ "~a: TLS connection failed: in ~a: ~a~%") host
proc (error->string error))