diff options
author | Ludovic Courtès <ludo@gnu.org> | 2021-10-15 22:21:02 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2021-10-15 23:16:28 +0200 |
commit | bd61d62182bfda4a695757ec66810b28e8e1a6d0 (patch) | |
tree | 9ed2c06455f42d0e7bc47fcbc8fd20b3f33728ac | |
parent | 2d06103288a1e6392db665b46eff71d243ecb40c (diff) | |
download | guix-bd61d62182bfda4a695757ec66810b28e8e1a6d0.tar.gz |
download: "GUIX_DOWNLOAD_FALLBACK_TEST=none" disables fallback mechanisms.
* guix/download.scm (url-fetch*): Handle (%download-fallback-test) set to 'none.
-rw-r--r-- | guix/download.scm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/guix/download.scm b/guix/download.scm index d5351d0673..4e219c9f49 100644 --- a/guix/download.scm +++ b/guix/download.scm @@ -472,6 +472,8 @@ download by itself using its own dependencies." ;; - #f, to use the normal download methods, not trying to exercise the ;; fallback mechanism; ;; + ;; - 'none, to disable all the fallback mechanisms; + ;; ;; - 'content-addressed-mirrors, to purposefully attempt to download from ;; a content-addressed mirror; ;; @@ -517,9 +519,9 @@ name in the store." (error "'guix-daemon' is too old, please upgrade" builtins)) (built-in-download (or name file-name) - (if (%download-fallback-test) - "https://example.org/does-not-exist" - url) + (match (%download-fallback-test) + ((or #f 'none) url) + (_ "https://example.org/does-not-exist")) #:guile guile #:system system #:hash-algo hash-algo |