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.
This commit is contained in:
parent
a1c1467756
commit
da9bf2efc5
|
@ -216,7 +216,7 @@ Download and deploy the latest version of Guix.\n"))
|
||||||
((source-dir)
|
((source-dir)
|
||||||
(derivation-output-path
|
(derivation-output-path
|
||||||
(assoc-ref (derivation-outputs drv) "out"))))
|
(assoc-ref (derivation-outputs drv) "out"))))
|
||||||
(show-what-to-build store (list source))
|
(if (show-what-to-build store (list source))
|
||||||
(if (build-derivations store (list source))
|
(if (build-derivations store (list source))
|
||||||
(let ((latest (string-append config-dir "/latest")))
|
(let ((latest (string-append config-dir "/latest")))
|
||||||
(add-indirect-root store latest)
|
(add-indirect-root store latest)
|
||||||
|
@ -224,4 +224,8 @@ Download and deploy the latest version of Guix.\n"))
|
||||||
(format #t
|
(format #t
|
||||||
(_ "updated ~a successfully deployed under `~a'~%")
|
(_ "updated ~a successfully deployed under `~a'~%")
|
||||||
%guix-package-name latest)
|
%guix-package-name latest)
|
||||||
|
#t)
|
||||||
|
(leave (_ "failed to update Guix, check the build log~%")))
|
||||||
|
(begin
|
||||||
|
(display (_ "Guix already up to date\n"))
|
||||||
#t))))))))
|
#t))))))))
|
||||||
|
|
|
@ -118,7 +118,8 @@ General help using GNU software: <http://www.gnu.org/gethelp/>"))
|
||||||
|
|
||||||
(define* (show-what-to-build store drv #:optional dry-run?)
|
(define* (show-what-to-build store drv #:optional dry-run?)
|
||||||
"Show what will or would (depending on DRY-RUN?) be built in realizing the
|
"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* ((req (append-map (lambda (drv-path)
|
||||||
(let ((d (call-with-input-file drv-path
|
(let ((d (call-with-input-file drv-path
|
||||||
read-derivation)))
|
read-derivation)))
|
||||||
|
@ -140,7 +141,8 @@ derivations listed in DRV."
|
||||||
(N_ "~:[the following derivation will be built:~%~{ ~a~%~}~;~]"
|
(N_ "~:[the following derivation will be built:~%~{ ~a~%~}~;~]"
|
||||||
"~:[the following derivations will be built:~%~{ ~a~%~}~;~]"
|
"~:[the following derivations will be built:~%~{ ~a~%~}~;~]"
|
||||||
(length req*))
|
(length req*))
|
||||||
(null? req*) req*))))
|
(null? req*) req*))
|
||||||
|
(pair? req*)))
|
||||||
|
|
||||||
(define-syntax with-error-handling
|
(define-syntax with-error-handling
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
|
|
Loading…
Reference in New Issue