[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: scripts: substitute: Cache connection when lookin
From: |
guix-commits |
Subject: |
branch master updated: scripts: substitute: Cache connection when looking for narinfos. |
Date: |
Sun, 06 Jun 2021 12:55:05 -0400 |
This is an automated email from the git hooks/post-receive script.
mothacehe pushed a commit to branch master
in repository guix.
The following commit(s) were added to refs/heads/master by this push:
new a068ed6 scripts: substitute: Cache connection when looking for
narinfos.
a068ed6 is described below
commit a068ed6a5f5b3535fce49ac4eca1fec82edd6fdc
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Fri Jun 4 08:49:39 2021 +0200
scripts: substitute: Cache connection when looking for narinfos.
The process-substitution procedure is opening two distinct connections. The
first one when looking for narinfo by calling lookup-narinfo and the other
one
when fetching nar files.
Cache the connection when looking for narinfos so that process-substitution
only opens one connection.
* guix/scripts/substitute.scm (lookup-narinfo): Cache connection by using
open-connection-for-uri/cached.
---
guix/scripts/substitute.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index 54311c3..44448ff 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -163,7 +163,9 @@ if file doesn't exist, and the narinfo otherwise."
(define (lookup-narinfo caches path authorized?)
"Return the narinfo for PATH in CACHES, or #f when no substitute for PATH
was found."
- (match (lookup-narinfos/diverse caches (list path) authorized?)
+ (match (lookup-narinfos/diverse
+ caches (list path) authorized?
+ #:open-connection open-connection-for-uri/cached)
((answer) answer)
(_ #f)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: scripts: substitute: Cache connection when looking for narinfos.,
guix-commits <=