diff --git a/guix/inferior.scm b/guix/inferior.scm index 76c2a767c6..362739623b 100644 --- a/guix/inferior.scm +++ b/guix/inferior.scm @@ -918,7 +918,9 @@ X.509 host certificate; otherwise, warn about the problem and keep going." (define (key commits) (bytevector->base32-string (sha256 - (string->utf8 (string-concatenate commits))))) + (string->utf8 (string-append + (if authenticate? "" "unauthenticated:") + (string-concatenate commits)))))) (define (cached commits) (string-append cache-directory "/" (key commits))) @@ -990,15 +992,12 @@ X.509 host certificate; otherwise, warn about the problem and keep going." ;; what's going to be built. (built-derivations (list profile)) - ;; Cache if and only if AUTHENTICATE? is true. - (if authenticate? - (mbegin %store-monad - (symlink* (derivation->output-path profile) (cached commits)) - (add-indirect-root* (cached commits)) - (return (cached commits))) - (mbegin %store-monad - (add-temp-root* (derivation->output-path profile)) - (return (derivation->output-path profile))))))))))) + ;; This is safe, since we are using a different key for + ;; unauthenticated commits. + (mbegin %store-monad + (symlink* (derivation->output-path profile) (cached commits)) + (add-indirect-root* (cached commits)) + (return (cached commits)))))))))) (define* (inferior-for-channels channels #:key