summaryrefslogtreecommitdiff
path: root/guix/scripts/pull.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/scripts/pull.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/scripts/pull.scm')
-rw-r--r--guix/scripts/pull.scm20
1 files changed, 12 insertions, 8 deletions
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 42ff525524..942bf501c5 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -216,12 +216,16 @@ Download and deploy the latest version of Guix.\n"))
((source-dir)
(derivation-output-path
(assoc-ref (derivation-outputs drv) "out"))))
- (show-what-to-build store (list source))
- (if (build-derivations store (list source))
- (let ((latest (string-append config-dir "/latest")))
- (add-indirect-root store latest)
- (switch-symlinks latest source-dir)
- (format #t
- (_ "updated ~a successfully deployed under `~a'~%")
- %guix-package-name latest)
+ (if (show-what-to-build store (list source))
+ (if (build-derivations store (list source))
+ (let ((latest (string-append config-dir "/latest")))
+ (add-indirect-root store latest)
+ (switch-symlinks latest source-dir)
+ (format #t
+ (_ "updated ~a successfully deployed under `~a'~%")
+ %guix-package-name latest)
+ #t)
+ (leave (_ "failed to update Guix, check the build log~%")))
+ (begin
+ (display (_ "Guix already up to date\n"))
#t))))))))