From 98eb8cbe8d0bdebde0e151bfb309aa27abaef4d7 Mon Sep 17 00:00:00 2001 From: Nikita Karetnikov Date: Sun, 21 Apr 2013 08:08:40 +0000 Subject: ui: Add a 'define-diagnostic' macro. * guix/ui.scm (define-diagnostic): New macro, which is based on the previous version of 'warning'. (warning, leave): Redefine using 'define-diagnostic'. (report-error): New macro. (install-locale): Use 'warning' instead of 'format'. (call-with-error-handling): Adjust 'leave'. * gnu/packages.scm (package-files): Use 'warning' instead of 'format'. * guix/gnu-maintenance.scm (http-fetch): Use 'warning' and 'leave'. * guix/scripts/build.scm (derivations-from-package-expressions, guix-build): Adjust 'leave'. * guix/scripts/download.scm (guix-download): Adjust 'leave'. * guix/scripts/gc.scm (size->number, %options): Adjust 'leave'. * guix/scripts/package.scm (roll-back, guix-package): Adjust 'leave'. * po/POTFILES.in: Add 'guix/gnu-maintenance.scm'. --- gnu/packages.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu') diff --git a/gnu/packages.scm b/gnu/packages.scm index f4d93a789d..e9f2540b91 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm @@ -19,6 +19,7 @@ (define-module (gnu packages) #:use-module (guix packages) + #:use-module (guix ui) #:use-module (guix utils) #:use-module (ice-9 ftw) #:use-module (ice-9 vlist) @@ -90,9 +91,8 @@ result) (const #f) ; skip (lambda (path stat errno result) - (format (current-error-port) - (_ "warning: cannot access `~a': ~a~%") - path (strerror errno)) + (warning (_ "cannot access `~a': ~a~%") + path (strerror errno)) result) '() %distro-module-directory -- cgit 1.4.1