summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-09-02 23:30:07 +0200
committerLudovic Courtès <ludo@gnu.org>2013-09-02 23:33:13 +0200
commit00554b2a0f4410e428de527c16c2b3bbe8daeb3a (patch)
tree44093f2bed2e4617bcfb0f5eda30a3402b00dd3c /guix
parent43dd92024ab54921fbf85285d04344cb2c6e77cc (diff)
downloadgnu-guix-00554b2a0f4410e428de527c16c2b3bbe8daeb3a.tar
gnu-guix-00554b2a0f4410e428de527c16c2b3bbe8daeb3a.tar.gz
substitute-binary: Show the Nar size, when available.
* guix/scripts/substitute-binary.scm (guix-substitute-binary)["--substitute"]: Show the Nar size, when available. * guix/ui.scm (show-what-to-build): Add 'TODO'.
Diffstat (limited to 'guix')
-rwxr-xr-xguix/scripts/substitute-binary.scm9
-rw-r--r--guix/ui.scm1
2 files changed, 8 insertions, 2 deletions
diff --git a/guix/scripts/substitute-binary.scm b/guix/scripts/substitute-binary.scm
index 97bbfcbce8..63f0c4f8d2 100755
--- a/guix/scripts/substitute-binary.scm
+++ b/guix/scripts/substitute-binary.scm
@@ -508,8 +508,13 @@ PORT. REPORT-PROGRESS is a two-argument procedure such as that returned by
;; Tell the daemon what the expected hash of the Nar itself is.
(format #t "~a~%" (narinfo-hash narinfo))
- (format (current-error-port) "downloading `~a' from `~a'...~%"
- store-path (uri->string uri))
+ (format (current-error-port) "downloading `~a' from `~a'~:[~*~; (~,1f MiB installed)~]...~%"
+ store-path (uri->string uri)
+
+ ;; Use the Nar size as an estimate of the installed size.
+ (narinfo-size narinfo)
+ (and=> (narinfo-size narinfo)
+ (cute / <> (expt 2. 20))))
(let*-values (((raw download-size)
;; Note that Hydra currently generates Nars on the fly
;; and doesn't specify a Content-Length, so
diff --git a/guix/ui.scm b/guix/ui.scm
index 9251d73f18..720d01be02 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -242,6 +242,7 @@ available for download."
(substitutable-path-info store
download)))))
download)))
+ ;; TODO: Show the installed size of DOWNLOAD.
(if dry-run?
(begin
(format (current-error-port)