summaryrefslogtreecommitdiff
path: root/guix/ui.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-02-22 21:08:06 +0100
committerLudovic Courtès <ludo@gnu.org>2013-02-22 21:08:06 +0100
commit4d60610ad7929f5745afec36bd856434cc825bd9 (patch)
tree97afc5601b68f853404909dc8778708cfaaa24e8 /guix/ui.scm
parent7b50c68455b07713392cb92a56dbf74fbcc2d182 (diff)
pull: Distinguish "already up to date" from "updated".
* guix/ui.scm (show-what-to-build): Return (length req*). * guix/scripts/pull.scm (guix-pull): Print an "already up to date" message when there's nothing to build.
Diffstat (limited to 'guix/ui.scm')
-rw-r--r--guix/ui.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/guix/ui.scm b/guix/ui.scm
index 7d1ea2bcbd..7e0c61b4f8 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -118,7 +118,8 @@ General help using GNU software: <http://www.gnu.org/gethelp/>"))
(define* (show-what-to-build store drv #:optional dry-run?)
"Show what will or would (depending on DRY-RUN?) be built in realizing the
-derivations listed in DRV."
+derivations listed in DRV. Return #t if there's something to build, #f
+otherwise."
(let* ((req (append-map (lambda (drv-path)
(let ((d (call-with-input-file drv-path
read-derivation)))
@@ -140,7 +141,8 @@ derivations listed in DRV."
(N_ "~:[the following derivation will be built:~%~{ ~a~%~}~;~]"
"~:[the following derivations will be built:~%~{ ~a~%~}~;~]"
(length req*))
- (null? req*) req*))))
+ (null? req*) req*))
+ (pair? req*)))
(define-syntax with-error-handling
(syntax-rules ()