Browse Source

build-self: Emit a useful message upon error.

* build-aux/build-self.scm (build): Raise a '&message' condition instead
of calling 'error'.
gn-latest-20200428
Ludovic Courtès 3 years ago
parent
commit
ac4d2ec81a
No known key found for this signature in database GPG Key ID: 90B11993D9AEBB5
1 changed files with 11 additions and 1 deletions
  1. +11
    -1
      build-aux/build-self.scm

+ 11
- 1
build-aux/build-self.scm View File

@ -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


Loading…
Cancel
Save