[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/08: download: Delete the output file upon failure.
From: |
guix-commits |
Subject: |
01/08: download: Delete the output file upon failure. |
Date: |
Sat, 21 Mar 2020 19:02:34 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 4a6ec23a9780bd75a7e527bd0dfb1943347869bb
Author: Ludovic Courtès <address@hidden>
AuthorDate: Sat Mar 21 23:08:04 2020 +0100
download: Delete the output file upon failure.
This allows ENOSPC conditions to be properly reported as such rather
than as a hash mismatch due to the availability of a truncated file.
Fixes <https://bugs.gnu.org/39993>.
Reported by Maxim Cournoyer <address@hidden>.
* guix/build/download.scm (url-fetch): In the failure case, delete FILE.
---
guix/build/download.scm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/guix/build/download.scm b/guix/build/download.scm
index c647d00..46af149 100644
--- a/guix/build/download.scm
+++ b/guix/build/download.scm
@@ -693,6 +693,13 @@ otherwise simply ignore them."
(()
(format (current-error-port) "failed to download ~s from ~s~%"
file url)
+
+ ;; Remove FILE in case we made an incomplete download, for example due
+ ;; to ENOSPC.
+ (catch 'system-error
+ (lambda ()
+ (delete-file file))
+ (const #f))
#f))))
;;; download.scm ends here
- branch master updated (70236ba -> 6f34756), guix-commits, 2020/03/21
- 01/08: download: Delete the output file upon failure.,
guix-commits <=
- 03/08: guix-install.sh: /etc/profile.d/guix.sh sources ~/.guix-profile/etc/profile., guix-commits, 2020/03/21
- 05/08: gnu: clipnotify: Comment on the lack of a test suite., guix-commits, 2020/03/21
- 02/08: guix-install.sh: Add a trailing colon to 'INFOPATH'., guix-commits, 2020/03/21
- 07/08: gnu: radare2: Update to 4.2.1., guix-commits, 2020/03/21
- 04/08: gnu: clipmenu: Re-indent., guix-commits, 2020/03/21
- 06/08: gnu: clipmenu: Improve the package definition, guix-commits, 2020/03/21
- 08/08: gnu: cutter: Update to 1.10.1., guix-commits, 2020/03/21