guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/03: substitute: Make download messages more concise.


From: Ludovic Courtès
Subject: 01/03: substitute: Make download messages more concise.
Date: Mon, 10 Oct 2016 20:18:01 +0000 (UTC)

civodul pushed a commit to branch master
in repository guix.

commit 7c515a43b0f2c6c38ecb59cdb2a4a5bb90e67c2a
Author: Ludovic Courtès <address@hidden>
Date:   Mon Oct 10 09:55:25 2016 +0200

    substitute: Make download messages more concise.
    
    'guix substitute' now displays 2 lines per download instead of 4.
    Suggested by Ricardo Wurmus.
    
    * guix/scripts/substitute.scm (assert-valid-narinfo): Have #:verbose?
    default to #f.  Remove leading newline in message.
    (process-substitution): Display the URI rather than the store file name.
    Display two newlines after the substitution.
---
 guix/scripts/substitute.scm |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index 21e0613..8f50477 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -391,7 +391,7 @@ No authentication and authorization checks are performed 
here!"
 
 (define* (assert-valid-narinfo narinfo
                                #:optional (acl (current-acl))
-                               #:key (verbose? #t))
+                               #:key verbose?)
   "Raise an exception if NARINFO lacks a signature, has an invalid signature,
 or is signed by an unauthorized key."
   (let ((hash (narinfo-sha256 narinfo)))
@@ -404,9 +404,8 @@ or is signed by an unauthorized key."
           (unless %allow-unauthenticated-substitutes?
             (assert-valid-signature narinfo signature hash acl)
             (when verbose?
-              ;; Visually separate substitutions with a newline.
               (format (current-error-port)
-                      (_ "~%Found valid signature for ~a~%")
+                      (_ "Found valid signature for ~a~%")
                       (narinfo-path narinfo))
               (format (current-error-port)
                       (_ "From ~a~%")
@@ -893,7 +892,7 @@ DESTINATION as a nar file.  Verify the substitute against 
ACL."
             ;; "(4.1MiB installed)"; it shows the size of the package once
             ;; installed.
             (_ "Downloading ~a~:[~*~; (~a installed)~]...~%")
-            (store-path-abbreviation store-item)
+            (uri->string uri)
             ;; Use the Nar size as an estimate of the installed size.
             (narinfo-size narinfo)
             (and=> (narinfo-size narinfo)
@@ -921,8 +920,9 @@ DESTINATION as a nar file.  Verify the substitute against 
ACL."
       ;; Unpack the Nar at INPUT into DESTINATION.
       (restore-file input destination)
 
-      ;; Skip a line after what 'progress-proc' printed.
-      (newline (current-error-port))
+      ;; Skip a line after what 'progress-proc' printed, and another one to
+      ;; visually separate substitutions.
+      (display "\n\n" (current-error-port))
 
       (every (compose zero? cdr waitpid) pids))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]