me
/
guix
Archived
1
0
Fork 0

time-travel-manifest: Use a separate Git checkout cache.

* etc/time-travel-manifest.scm (guix-instance-compiler): Parameterize
%REPOSITORY-CACHE-DIRECTORY.
master
Ludovic Courtès 2022-07-10 12:41:41 +02:00
parent 9fdc4b6c28
commit 5d0437ea8c
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 13 additions and 2 deletions

View File

@ -20,7 +20,11 @@
;;; releases from the current Guix, as per 'guix time-machine'. ;;; releases from the current Guix, as per 'guix time-machine'.
(use-modules (srfi srfi-9) (ice-9 match) (use-modules (srfi srfi-9) (ice-9 match)
(guix channels) (guix gexp)) (guix channels) (guix gexp)
((guix store) #:select (%store-monad))
((guix monads) #:select (mparameterize return))
((guix git) #:select (%repository-cache-directory))
((guix build utils) #:select (mkdir-p)))
;; Representation of the latest channels. This type exists just so we can ;; Representation of the latest channels. This type exists just so we can
;; refer to such records in a gexp. ;; refer to such records in a gexp.
@ -33,7 +37,14 @@
system target) system target)
(match instance (match instance
(($ <guix-instance> channels) (($ <guix-instance> channels)
(latest-channel-derivation channels)))) ;; When this manifest is evaluated by Cuirass, make sure it does not
;; fiddle with the cached checkout that Cuirass is also using since
;; concurrent accesses are unsafe.
(mparameterize %store-monad ((%repository-cache-directory
(string-append (%repository-cache-directory)
"/time-travel")))
(return (mkdir-p (%repository-cache-directory)))
(latest-channel-derivation channels)))))
(define (guix-instance->manifest-entry instance) (define (guix-instance->manifest-entry instance)
"Return a manifest entry for INSTANCE." "Return a manifest entry for INSTANCE."