@@ 915,13 915,13 @@ X.509 host certificate; otherwise, warn about the problem and keep going."
#:verify-certificate? verify-certificate?))
channels))
- (define key
+ (define (key commits)
(bytevector->base32-string
(sha256
(string->utf8 (string-concatenate commits)))))
- (define cached
- (string-append cache-directory "/" key))
+ (define (cached commits)
+ (string-append cache-directory "/" (key commits)))
(define (base32-encoded-sha256? str)
(= (string-length str) 52))
@@ 962,8 962,8 @@ X.509 host certificate; otherwise, warn about the problem and keep going."
(file-expiration-time ttl))
- (if (file-exists? cached)
- cached
+ (if (file-exists? (cached commits))
+ (cached commits)
(run-with-store store
(mlet* %store-monad ((instances
-> (latest-channel-instances store channels
@@ 975,6 975,7 @@ X.509 host certificate; otherwise, warn about the problem and keep going."
validate-channels
#:verify-certificate?
verify-certificate?))
+ (commits -> (map channel-instance-commit instances))
(profile
(channel-instances->derivation instances)))
(mbegin %store-monad
@@ 985,9 986,9 @@ X.509 host certificate; otherwise, warn about the problem and keep going."
;; 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))
+ (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)))))))))