From 2fe7ff87e23b18d49bd33cffc4766b7eaa382054 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sun, 1 Apr 2018 22:57:05 +0200 Subject: base: Make a writable copy of the checkout only when #:no-compile? is false. This avoids copying things back and forth. * src/cuirass/base.scm (fetch-repository): Add #:writable-copy? parameter. Call 'make-writable-copy' when it's true. (copy-repository-cache): Remove. (make-writable-copy): New procedure. (evaluate): Add 'source' parameter and pass it to the 'evaluate' program. (process-specs): Define 'compile?'. Pass #:writable-copy? to 'fetch-repository'. Remove call to 'copy-repository-cache'. Remove computation of the checkout directory name. Pass CHECKOUT to 'evaluate'. * bin/evaluate.in (main): Replace 'cachedir' with 'source'. Remove computation of the checkout directory name. --- bin/evaluate.in | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/evaluate.in b/bin/evaluate.in index 1439ea3..4c9efd5 100644 --- a/bin/evaluate.in +++ b/bin/evaluate.in @@ -35,7 +35,7 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@" (define* (main #:optional (args (command-line))) (match args - ((command load-path guix-package-path cachedir specstr) + ((command load-path guix-package-path source specstr) ;; Load FILE, a Scheme file that defines Hydra jobs. (let ((%user-module (make-fresh-user-module)) (spec (with-input-from-string specstr read)) @@ -44,8 +44,7 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@" (save-module-excursion (lambda () (set-current-module %user-module) - (with-directory-excursion - (string-append cachedir "/" (assq-ref spec #:name)) + (with-directory-excursion source (primitive-load (assq-ref spec #:file))))) (with-store store (unless (assoc-ref spec #:use-substitutes?) -- cgit v1.2.3