guix-commits
[Top][All Lists]
Advanced

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

branch master updated: download: Restore error reporting.


From: guix-commits
Subject: branch master updated: download: Restore error reporting.
Date: Thu, 06 May 2021 00:10:22 -0400

This is an automated email from the git hooks/post-receive script.

samplet pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 7262619  download: Restore error reporting.
7262619 is described below

commit 7262619d6fa570fa47228daaead1b0473914c069
Author: Timothy Sample <samplet@ngyro.com>
AuthorDate: Wed May 5 23:10:25 2021 -0400

    download: Restore error reporting.
    
    Normal error reporting was disrupted by the introduction of
    Disarchive in commit fbc2a52a32ddc664db8ebab420c2e17b1432c744.  In
    particular, running 'guix download' would succeed with a partially
    downloaded file.
    
    * guix/build/download.scm (disarchive-fetch/any): Return '#f' when
    Disarchive cannot be found, the specification cannot be found, or
    Disarchive fails due to an error.
---
 guix/build/download.scm | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/guix/build/download.scm b/guix/build/download.scm
index ce31038..b14db42 100644
--- a/guix/build/download.scm
+++ b/guix/build/download.scm
@@ -662,14 +662,15 @@ and write the output to FILE."
                 (lambda (disarchive)
                   (cons (module-ref disarchive '%disarchive-log-port)
                         (module-ref disarchive 'disarchive-assemble))))
-    (#f
-     (format #t "could not load Disarchive~%"))
+    (#f (format #t "could not load Disarchive~%")
+        #f)
     ((%disarchive-log-port . disarchive-assemble)
      (match (fetch-specification uris)
-       (#f
-        (format #t "could not find its Disarchive specification~%"))
+       (#f (format #t "could not find its Disarchive specification~%")
+           #f)
        (spec (parameterize ((%disarchive-log-port (current-output-port)))
-               (disarchive-assemble spec file #:resolver resolve)))))))
+               (false-if-exception*
+                (disarchive-assemble spec file #:resolver resolve))))))))
 
 (define* (url-fetch url file
                     #:key



reply via email to

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