download: Restore error reporting.

Normal error reporting was disrupted by the introduction of
Disarchive in commit fbc2a52a32.  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.
This commit is contained in:
Timothy Sample 2021-05-05 23:10:25 -04:00
parent 0b77d36ad0
commit 7262619d6f
No known key found for this signature in database
GPG Key ID: 2AC6A5EC1C357C59

View File

@ -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