Archived
1
0
Fork 0

inferior: Fix concurrent cached-profile calls.

* guix/inferior.scm (cached-profile): Do not create the profile symlink if it
already exists.
This commit is contained in:
Mathieu Othacehe 2021-03-05 12:49:06 +01:00
parent 7d63b77551
commit 6ee7e3d26b
No known key found for this signature in database
GPG key ID: 8354763531769CA6

View file

@ -755,8 +755,9 @@ seconds. This procedure opens a new connection to the build daemon."
(built-derivations (list profile)) (built-derivations (list profile))
;; Note: Caching is fine even when AUTHENTICATE? is false because ;; Note: Caching is fine even when AUTHENTICATE? is false because
;; we always call 'latest-channel-instances?'. ;; we always call 'latest-channel-instances?'.
(symlink* (derivation->output-path profile) cached) (unless (file-exists? cached)
(add-indirect-root* cached) (symlink* (derivation->output-path profile) cached)
(add-indirect-root* cached))
(return cached)))))) (return cached))))))
(define* (channels->cached-profile store channels (define* (channels->cached-profile store channels