From 6ee7e3d26b8f5d2a234518cc2ab1bfeba7cd7c18 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Fri, 5 Mar 2021 12:49:06 +0100 Subject: inferior: Fix concurrent cached-profile calls. * guix/inferior.scm (cached-profile): Do not create the profile symlink if it already exists. --- guix/inferior.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/guix/inferior.scm b/guix/inferior.scm index 714e1e1eae..d0cd1ccee7 100644 --- a/guix/inferior.scm +++ b/guix/inferior.scm @@ -755,8 +755,9 @@ seconds. This procedure opens a new connection to the build daemon." (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 -- cgit 1.4.1