guix/guix
Ludovic Courtès 8bd4126917
substitute: Retry downloading when a nar is unavailable.
Fixes <https://issues.guix.gnu.org/57978>
Reported by Attila Lendvai <attila@lendvai.name>.

Previously, if a narinfo was available but its corresponding nar was
missing (for instance because the narinfo was cached and the server
became unreachable in the meantime), 'guix substitute --substitute'
would try to download the nar from its preferred location and abort when
that fails.  This change forces one retry with each of the URLs.

* guix/scripts/substitute.scm (download-nar): Do not catch
'http-get-error?' exceptions.
(system-error?, network-error?, process-substitution/fallback): New
procedures.
(process-substitution): Call 'process-substitution/fallback' upon
'network-error?'.
* tests/substitute.scm ("substitute, first URL has narinfo but lacks nar, second URL unauthorized")
("substitute, first URL has narinfo but nar is 404, both URLs authorized")
("substitute, first URL has narinfo but nar is 404, one URL authorized")
("substitute, narinfo is available but nar is missing"): New tests.
2022-09-28 22:28:27 +02:00
..
build debug-link: Clarify what CRC is. 2022-09-26 23:29:37 +02:00
build-system build-system/go: Respect #:imported-modules when cross-compiling. 2022-09-24 17:59:05 +02:00
import import/cran: Process more complex license strings. 2022-09-28 22:10:33 +02:00
platforms platforms: x86: Rename Hurd hurd to i586-gnu. 2022-09-24 14:49:07 +02:00
scripts substitute: Retry downloading when a nar is unavailable. 2022-09-28 22:28:27 +02:00
store
tests tests: git: Write files as UTF-8. 2022-08-09 15:58:14 +02:00
android-repo-download.scm
avahi.scm
base16.scm
base32.scm
base64.scm
build-system.scm
bzr-download.scm
cache.scm
channels.scm channels: Consider news files as UTF-8-encoded by default. 2022-08-09 15:59:09 +02:00
ci.scm
colors.scm
combinators.scm
config.scm.in
cpio.scm
cpu.scm
cve.scm
cvs-download.scm
d3.v3.js
deprecation.scm
derivations.scm
describe.scm
diagnostics.scm
discovery.scm
docker.scm
download.scm download: Add a kernel.org mirror. 2022-09-26 23:29:36 +02:00
elf.scm
ftp-client.scm
gexp.scm gexp: directory-union: Fix documentation. 2022-08-28 21:14:18 -04:00
git-authenticate.scm
git-download.scm
git.scm
glob.scm
gnu-maintenance.scm gnu-maintenance: Remove unused procedures. 2022-09-26 23:29:37 +02:00
gnupg.scm
grafts.scm
graph.js
graph.scm
hash.scm
hg-download.scm
http-client.scm
i18n.scm
inferior.scm guix: inferior: Fix the behaviour of open-inferior #:error-port. 2022-07-08 13:51:34 +01:00
ipfs.scm
least-authority.scm
licenses.scm
lint.scm lint: Extract logic of 'check-mirror-url'. 2022-09-26 23:29:36 +02:00
man-db.scm
memoization.scm
modules.scm
monad-repl.scm monad-repl: Add "build", "lower", and "verbosity" commands. 2022-07-15 17:36:57 +02:00
monads.scm monads: Add 'mparameterize'. 2022-07-10 23:57:14 +02:00
nar.scm
narinfo.scm narinfo: Fix misleading docstring. 2022-09-24 17:59:04 +02:00
openpgp.scm
packages.scm
pki.scm
platform.scm guix: platform: Use #false instead of #f. 2022-09-07 14:24:52 +02:00
profiles.scm pull: Create a version 3 manifest. 2022-08-31 12:34:10 +02:00
profiling.scm
progress.scm
quirks.scm
read-print.scm read-print: Add rule for 'home-bash-configuration'. 2022-09-20 19:24:31 +02:00
records.scm
remote.scm
repl.scm
scripts.scm
search-paths.scm search-paths: Tweak $SSL_CERT_DIR comment. 2022-09-08 16:22:21 +02:00
self.scm guix gc: '--delete-generations' now deletes old Home generations. 2022-08-01 00:02:04 +02:00
serialization.scm
sets.scm
ssh.scm ssh: 'open-ssh-session' gracefully handles connection timeouts. 2022-08-10 16:53:58 +02:00
status.scm
store.scm store: Open daemon connections with SOCK_CLOEXEC. 2022-09-04 23:10:10 +02:00
substitutes.scm
svn-download.scm
swh.scm
tests.scm
transformations.scm
ui.scm ui: Describe package outputs. 2022-08-16 21:25:25 +02:00
upstream.scm upstream: Sort '%updaters' alphabetically. 2022-07-19 18:54:41 +02:00
utils.scm utils: Add target-mips64el?. 2022-08-05 00:14:30 +02:00
workers.scm