me
/
guix
Archived
1
0
Fork 0

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 838ac881ec, but it
became incorrect in 7cfd789150, which
no longer calls 'latest-channel-instances' on cache hits.

* guix/inferior.scm (cached-channel-instance): Do not create CACHED when
AUTHENTICATE? is false.
master
Ludovic Courtès 2021-11-30 11:19:30 +01:00
parent 1a0696e0a6
commit 9f371f23eb
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 12 additions and 5 deletions

View File

@ -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