summaryrefslogtreecommitdiff
path: root/guix/upstream.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-05-17 13:41:07 +0200
committerLudovic Courtès <ludo@gnu.org>2016-05-17 14:02:48 +0200
commit149590380adb240e0993931b4f72e6f285b24483 (patch)
tree674e6a742eb21d714eb2eee00eec87273e7e273e /guix/upstream.scm
parent787afdd0f1ce1d4aa7500d858f2635462b444699 (diff)
downloadgnu-guix-149590380adb240e0993931b4f72e6f285b24483.tar
gnu-guix-149590380adb240e0993931b4f72e6f285b24483.tar.gz
import: Gracefully report import failures.
Previously, something like 'guix import gnu which' would spit out a backtrace if, say, the 'which' tarball could not be authenticated. * guix/upstream.scm (download-tarball): Mention failure modes in docstring. * guix/import/gnu.scm (gnu-package->sexp): Return #f when 'download-tarball' returns #f. * guix/scripts/import.scm (guix-import): Call 'leave' when IMPORTER does not return a (package ...) sexp.
Diffstat (limited to 'guix/upstream.scm')
-rw-r--r--guix/upstream.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/guix/upstream.scm b/guix/upstream.scm
index 167c9ff89a..18157376d2 100644
--- a/guix/upstream.scm
+++ b/guix/upstream.scm
@@ -143,8 +143,9 @@ no update is needed or known."
#:key (key-download 'interactive))
"Download the tarball at URL to the store; check its OpenPGP signature at
SIGNATURE-URL, unless SIGNATURE-URL is false. On success, return the tarball
-file name. KEY-DOWNLOAD specifies a download policy for missing OpenPGP keys;
-allowed values: 'interactive' (default), 'always', and 'never'."
+file name; return #f on failure (network failure or authentication failure).
+KEY-DOWNLOAD specifies a download policy for missing OpenPGP keys; allowed
+values: 'interactive' (default), 'always', and 'never'."
(let ((tarball (download-to-store store url)))
(if (not signature-url)
tarball