summaryrefslogtreecommitdiff
path: root/guix/scripts/build.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-04-11 22:30:06 +0200
committerLudovic Courtès <ludo@gnu.org>2013-04-12 21:58:46 +0200
commit6f80c9d8f387f5b881a73cefdbbba91a40d8eec6 (patch)
treef0b16c44632db79e19e3c780ed0ffda20d30f51d /guix/scripts/build.scm
parentca877f5a3a0e216d2e0e62bea3e42cdc2e4c3dab (diff)
ui: Add a `warning' macro.
* guix/ui.scm (program-name, guix-warning-port): New variables. (warning): New macro. (guix-main): Parametrize PROGRAM-NAME. * guix/scripts/build.scm, guix/scripts/download.scm, guix/scripts/gc.scm, guix/scripts/package.scm: Adjust to use `leave' and `warning' consistently.
Diffstat (limited to 'guix/scripts/build.scm')
-rw-r--r--guix/scripts/build.scm16
1 files changed, 6 insertions, 10 deletions
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index a49bfdbeb8..339ad0d06f 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -176,9 +176,8 @@ Build the given PACKAGE-OR-DERIVATION and return their output paths.\n"))
0
paths))))
(lambda args
- (format (current-error-port)
- (_ "failed to create GC root `~a': ~a~%")
- root (strerror (system-error-errno args)))
+ (leave (_ "failed to create GC root `~a': ~a~%")
+ root (strerror (system-error-errno args)))
(exit 1)))))
(define newest-available-packages
@@ -202,13 +201,10 @@ Build the given PACKAGE-OR-DERIVATION and return their output paths.\n"))
((p) ; one match
p)
((p x ...) ; several matches
- (format (current-error-port)
- (_ "warning: ambiguous package specification `~a'~%")
- request)
- (format (current-error-port)
- (_ "warning: choosing ~a from ~a~%")
- (package-full-name p)
- (location->string (package-location p)))
+ (warning (_ "ambiguous package specification `~a'~%") request)
+ (warning (_ "choosing ~a from ~a~%")
+ (package-full-name p)
+ (location->string (package-location p)))
p)
(_ ; no matches
(if version