Subject: bug#30270: [PATCH] url-fetch returns #t instead of FILE

From: Maxim Cournoyer <[email-masked]>
Date: Sat, 27 Jan 2018 12:35:44 -0500

Maxim Cournoyer <[email-masked]> writes:

> Hello!
>
> Commit 347fa4aebf, introduced a regression where `url-fetch' would return #t
> instead of the file name (as the docstring says it should), which broke
> the fiasco script used to find broken hashes of Github's archives[0].
>
> Patch to follow.
  ^
>From 61ca016f3a2a6504d899a6ec3b9daaf1647be451 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <[email-masked]>
Date: Sat, 27 Jan 2018 12:22:11 -0500
Subject: [PATCH] download: Fix return value of the url-fetch procedure.

Fixes #30270 which was introduced by commit 347fa4aebf.

* guix/build/download.scm (url-fetch): Return `file' instead of #t upon success.
---
 guix/build/download.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/build/download.scm b/guix/build/download.scm
index 609a10053..1b630a9d6 100644
--- a/guix/build/download.scm
+++ b/guix/build/download.scm
@@ -770,7 +770,7 @@ otherwise simply ignore them."
                           #:reporter (progress-reporter/file
                                       (uri-abbreviation uri) size))
               (newline)))
-          #t)))
+          file)))
       ((ftp)
        (false-if-exception* (ftp-fetch uri file
                                        #:timeout timeout)))
-- 
2.16.0