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 @@ (define add-indirect-root*
(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)
(unless (file-exists? cached)
(symlink* (derivation->output-path profile) cached)
(add-indirect-root* cached))
(return cached))))))
(define* (channels->cached-profile store channels