summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorLudovic Courtès <ludovic.courtes@inria.fr>2018-03-28 12:13:58 +0200
committerLudovic Courtès <ludovic.courtes@inria.fr>2018-03-28 12:13:58 +0200
commit1872dd95253b4805a00bfe5dee8d1a0ed90af149 (patch)
tree63e870f6073e9f69fd6bcd7fb4ce7da1a210309b /bin
parent326264c8e9445cb94d7fb33aab5ef93dc99ffe57 (diff)
downloadcuirass-1872dd95253b4805a00bfe5dee8d1a0ed90af149.tar
cuirass-1872dd95253b4805a00bfe5dee8d1a0ed90af149.tar.gz
evaluate: Tolerate calls to 'build-things' during evaluations.
* bin/evaluate.in (main): 'build-things' replacement no longer calls 'exit'.
Diffstat (limited to 'bin')
-rw-r--r--bin/evaluate.in12
1 files changed, 7 insertions, 5 deletions
diff --git a/bin/evaluate.in b/bin/evaluate.in
index a2fa86d..1439ea3 100644
--- a/bin/evaluate.in
+++ b/bin/evaluate.in
@@ -51,14 +51,16 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@"
(unless (assoc-ref spec #:use-substitutes?)
;; Make sure we don't resort to substitutes.
(set-build-options store #:use-substitutes? #f #:substitute-urls '()))
+
;; Grafts can trigger early builds. We do not want that to happen
;; during evaluation, so use a sledgehammer to catch such problems.
+ ;; An exception, though, is the evaluation of Guix itself, which
+ ;; requires building a "trampoline" program.
(set! build-things
- (lambda (store . args)
- (display "error: trying to build things during evaluation!~%"
- stderr)
- (simple-format stderr "'build-things' arguments: ~S~%" args)
- (exit 1)))
+ (lambda (store . args)
+ (simple-format stderr "warning: building things during evaluation~%")
+ (simple-format stderr "'build-things' arguments: ~S~%" args)
+ (apply real-build-things store args)))
(parameterize ((%use-substitutes? (assoc-ref spec #:use-substitutes?)))
(unless (string-null? guix-package-path)