[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/14: substitute: Stop using call-with-cached-connection in fetch-narin
From: |
guix-commits |
Subject: |
07/14: substitute: Stop using call-with-cached-connection in fetch-narinfos. |
Date: |
Mon, 22 Feb 2021 15:44:46 -0500 (EST) |
cbaines pushed a commit to branch master
in repository guix.
commit 7b812f7c84c43455cdd68a0e51b6ded018afcc8e
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Thu Jan 7 19:44:56 2021 +0000
substitute: Stop using call-with-cached-connection in fetch-narinfos.
Instead, just pass open-connection-for-uri/maybe to http-multiple-get. This
code should be functionaly similar to the previous code. The eventual aim of
this is to make the connection caching not mandatory in fetch-narinfos.
* guix/scripts/substitute.scm (fetch-narinfos): Remove use of
call-with-cached-connection.
---
guix/scripts/substitute.scm | 22 ++++++++--------------
1 file changed, 8 insertions(+), 14 deletions(-)
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index f01c11b..cd52ad7 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -412,20 +412,14 @@ port to it, or, if connection failed, print a warning and
return #f. Pass
;; on the X.509 PKI. We can do it because we authenticate
;; narinfos, which provides a much stronger guarantee.
(let* ((requests (map (cut narinfo-request url <>) paths))
- (result (call-with-cached-connection uri
- (lambda (port)
- (if port
- (begin
- (update-progress!)
- (http-multiple-get uri
- handle-narinfo-response
'()
- requests
- #:open-connection
-
open-connection-for-uri/cached
- #:verify-certificate? #f
- #:port port))
- '()))
- open-connection-for-uri/maybe)))
+ (result (begin
+ (update-progress!)
+ (http-multiple-get uri
+ handle-narinfo-response '()
+ requests
+ #:open-connection
+ open-connection-for-uri/maybe
+ #:verify-certificate? #f))))
(newline (current-error-port))
result))
((file #f)
- branch master updated (f1f6e49 -> 20c08a8), guix-commits, 2021/02/22
- 01/14: substitute: Remove buffer handling from fetch., guix-commits, 2021/02/22
- 02/14: substitute: Remove connection handling from fetch., guix-commits, 2021/02/22
- 03/14: substitute: Remove redundant let block from fetch., guix-commits, 2021/02/22
- 04/14: guix: Move http-multiple-get to (guix http-client)., guix-commits, 2021/02/22
- 05/14: http-client: Add error handling to http-multiple-get., guix-commits, 2021/02/22
- 06/14: substitute: open-connection-for-uri/maybe add #:verify-certificate?., guix-commits, 2021/02/22
- 10/14: substitute: Remove now redundant connection caching helpers., guix-commits, 2021/02/22
- 08/14: http-client: Accept #:open-connection in http-fetch., guix-commits, 2021/02/22
- 07/14: substitute: Stop using call-with-cached-connection in fetch-narinfos.,
guix-commits <=
- 09/14: substitute: Change connection cache handling in process-substitution., guix-commits, 2021/02/22
- 13/14: substitute: Remove fetch-narinfos use open-connection-for-uri/maybe., guix-commits, 2021/02/22
- 11/14: substitute: Remove redundant fetch arguments., guix-commits, 2021/02/22
- 12/14: substitute: Inline fetch in to process-substitutes., guix-commits, 2021/02/22
- 14/14: substitute: Rework connection error handling., guix-commits, 2021/02/22