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'.
This commit is contained in:
		
							parent
							
								
									43dd92024a
								
							
						
					
					
						commit
						00554b2a0f
					
				
					 2 changed files with 8 additions and 2 deletions
				
			
		| 
						 | 
					@ -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.
 | 
					        ;; Tell the daemon what the expected hash of the Nar itself is.
 | 
				
			||||||
        (format #t "~a~%" (narinfo-hash narinfo))
 | 
					        (format #t "~a~%" (narinfo-hash narinfo))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        (format (current-error-port) "downloading `~a' from `~a'...~%"
 | 
					        (format (current-error-port) "downloading `~a' from `~a'~:[~*~; (~,1f MiB installed)~]...~%"
 | 
				
			||||||
                store-path (uri->string uri))
 | 
					                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)
 | 
					        (let*-values (((raw download-size)
 | 
				
			||||||
                       ;; Note that Hydra currently generates Nars on the fly
 | 
					                       ;; Note that Hydra currently generates Nars on the fly
 | 
				
			||||||
                       ;; and doesn't specify a Content-Length, so
 | 
					                       ;; and doesn't specify a Content-Length, so
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -242,6 +242,7 @@ available for download."
 | 
				
			||||||
                                       (substitutable-path-info store
 | 
					                                       (substitutable-path-info store
 | 
				
			||||||
                                                                download)))))
 | 
					                                                                download)))))
 | 
				
			||||||
                     download)))
 | 
					                     download)))
 | 
				
			||||||
 | 
					    ;; TODO: Show the installed size of DOWNLOAD.
 | 
				
			||||||
    (if dry-run?
 | 
					    (if dry-run?
 | 
				
			||||||
        (begin
 | 
					        (begin
 | 
				
			||||||
          (format (current-error-port)
 | 
					          (format (current-error-port)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue