[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/11: inferior: 'cached-channel-instance' does not cache unauthenticate
From: |
guix-commits |
Subject: |
01/11: inferior: 'cached-channel-instance' does not cache unauthenticated instances. |
Date: |
Wed, 1 Dec 2021 11:55:25 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 9f371f23ebfa20f70b3bfd55dc459b683f21ba91
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Tue Nov 30 11:19:30 2021 +0100
inferior: 'cached-channel-instance' does not cache unauthenticated
instances.
The comment saying that caching is fine even when AUTHENTICATE? is false
was true in commit 838ac881ec98cb71d4a4e4b20773573f99ecbf25, but it
became incorrect in 7cfd789150f448cf5256b88915bae4163cc9db03, which
no longer calls 'latest-channel-instances' on cache hits.
* guix/inferior.scm (cached-channel-instance): Do not create CACHED when
AUTHENTICATE? is false.
---
guix/inferior.scm | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/guix/inferior.scm b/guix/inferior.scm
index 81958ba..febac29 100644
--- a/guix/inferior.scm
+++ b/guix/inferior.scm
@@ -785,6 +785,9 @@ determines whether CHANNELS are authenticated."
(define add-indirect-root*
(store-lift add-indirect-root))
+ (define add-temp-root*
+ (store-lift add-temp-root))
+
(mkdir-p cache-directory)
(maybe-remove-expired-cache-entries cache-directory
cache-entries
@@ -805,11 +808,15 @@ determines whether CHANNELS are authenticated."
;; what's going to be built.
(built-derivations (list profile))
- ;; Note: Caching is fine even when AUTHENTICATE? is false because
- ;; we always call 'latest-channel-instances?'.
- (symlink* (derivation->output-path profile) cached)
- (add-indirect-root* cached)
- (return cached))))))
+ ;; Cache if and only if AUTHENTICATE? is true.
+ (if authenticate?
+ (mbegin %store-monad
+ (symlink* (derivation->output-path profile) cached)
+ (add-indirect-root* cached)
+ (return cached))
+ (mbegin %store-monad
+ (add-temp-root* profile)
+ (return profile))))))))
(define* (inferior-for-channels channels
#:key
- branch master updated (1a0696e -> 8cc099b), guix-commits, 2021/12/01
- 01/11: inferior: 'cached-channel-instance' does not cache unauthenticated instances.,
guix-commits <=
- 03/11: doc: Document LUKS2 GRUB support and shortcomings, guix-commits, 2021/12/01
- 02/11: gnu: system: Add LUKS2 support for the root file system., guix-commits, 2021/12/01
- 04/11: installer: Make LUKS2 the default format for encrypted devices, guix-commits, 2021/12/01
- 05/11: gnu: Add python-codespell., guix-commits, 2021/12/01
- 10/11: gnu: Add libfido2., guix-commits, 2021/12/01
- 08/11: gnu: Add vim-nerdtree., guix-commits, 2021/12/01
- 06/11: gnu: Add smplayer., guix-commits, 2021/12/01
- 07/11: build-system: haskell: Add ‘hackage-uri’ procedure., guix-commits, 2021/12/01
- 11/11: gnu: openssh: Add support for ecdsa-sk, ed25519-sk ssh keys., guix-commits, 2021/12/01
- 09/11: gnu: Add libcbor., guix-commits, 2021/12/01