diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-09-13 10:23:39 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-09-13 10:29:59 +0200 |
commit | ac4d2ec81a9f7c439b21b4c4ae4a2e949c78ab2e (patch) | |
tree | d9f306ebe193af2cbfe98d2cf1648a63bbf12259 /build-aux/build-self.scm | |
parent | 78c9058dde237d6913a30a40c1f5ca19395f86c3 (diff) | |
download | guix-ac4d2ec81a9f7c439b21b4c4ae4a2e949c78ab2e.tar.gz |
build-self: Emit a useful message upon error.
* build-aux/build-self.scm (build): Raise a '&message' condition instead of calling 'error'.
Diffstat (limited to 'build-aux/build-self.scm')
-rw-r--r-- | build-aux/build-self.scm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/build-aux/build-self.scm b/build-aux/build-self.scm index 09979dc410..306b2c6b63 100644 --- a/build-aux/build-self.scm +++ b/build-aux/build-self.scm @@ -25,6 +25,8 @@ #:use-module (guix build-system gnu) #:use-module (srfi srfi-1) #:use-module (srfi srfi-19) + #:use-module (srfi srfi-34) + #:use-module (srfi srfi-35) #:use-module (rnrs io ports) #:use-module (ice-9 match) #:use-module (ice-9 popen) @@ -420,7 +422,15 @@ files." ;; Unsupported PULL-VERSION. (return #f)) ((? string? str) - (error "invalid build result" (list build str)))))))) + (raise (condition + (&message + (message (format #f "You found a bug: the program '~a' +failed to compute the derivation for Guix (version: ~s; system: ~s; +host version: ~s; pull-version: ~s). +Please report it by email to <~a>.~%" + (derivation->output-path build) + version system %guix-version pull-version + %guix-bug-report-address))))))))))) ;; This file is loaded by 'guix pull'; return it the build procedure. build |