diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2021-12-05 19:17:41 +0100 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2021-12-05 19:17:41 +0100 |
commit | 9bc0f45df5d6aed217020b1183dca54989844fb0 (patch) | |
tree | d927e89949ff7f65b5059bc94273c53fd43d0763 /guix/inferior.scm | |
parent | 6db3c536e89deb8a204e756f427614925a7d2582 (diff) | |
parent | 10554e0a57feeea470127a1d0441957d1776b0bd (diff) | |
download | guix-patches-9bc0f45df5d6aed217020b1183dca54989844fb0.tar guix-patches-9bc0f45df5d6aed217020b1183dca54989844fb0.tar.gz |
Merge remote-tracking branch 'origin/master' into core-updates-frozen
Diffstat (limited to 'guix/inferior.scm')
-rw-r--r-- | guix/inferior.scm | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/guix/inferior.scm b/guix/inferior.scm index 81958baaa5..febac29766 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 |