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 guix: Remove duplicate definitions of dump-port. 2022-05-20 20:42:53 +02:00
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 gnu: bazaar: Obsolete with breezy. 2022-05-31 14:54:02 -04:00
cache.scm cache: Catch invalid 'last-expiry-cleanup'. 2022-06-04 12:04:23 +02:00
channels.scm channels: Consider news files as UTF-8-encoded by default. 2022-08-09 15:59:09 +02:00
ci.scm ci: Restrict substitute search to guix jobset. 2021-12-19 16:25:51 +01:00
colors.scm colors: Add 'colorize-full-matches'. 2022-04-19 18:07:49 +02:00
combinators.scm combinators: Add 'define-compile-time-procedure'. 2021-12-20 16:21:40 +01:00
config.scm.in
cpio.scm
cpu.scm guix: cpu: Add detection for aarch64 CPUs. 2022-05-17 15:19:41 +03:00
cve.scm
cvs-download.scm
d3.v3.js
deprecation.scm guix: Add define-deprecated/public-alias. 2022-04-12 20:32:32 +02:00
derivations.scm derivations: Coalesce inputs that have the same output path. 2022-03-07 22:49:27 +01:00
describe.scm
diagnostics.scm diagnostics: Fix typo about 0-indexed COL in location. 2022-05-31 14:52:14 -04:00
discovery.scm
docker.scm docker: Enable arm64 docker image building for 'guix pack'. 2021-11-23 10:24:27 +01:00
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-authenticate: Ensure the target is a descendant of the introductory commit. 2022-02-14 11:23:08 +01:00
git-download.scm git-download: Set locale to deal with Unicode in git metadata. 2022-04-20 23:46:43 +02:00
git.scm git: Add 'commit-descendant?'. 2022-02-14 11:23:07 +01:00
glob.scm
gnu-maintenance.scm gnu-maintenance: Remove unused procedures. 2022-09-26 23:29:37 +02:00
gnupg.scm gnupg: Honor GnuPG's configuration for the key server. 2021-11-18 14:41:53 -05:00
grafts.scm
graph.js
graph.scm graph: Factorize 'lookup-backend'. 2022-03-18 16:03:33 +01:00
hash.scm guix hash: Extract file hashing procedures. 2022-01-06 16:27:30 +01:00
hg-download.scm
http-client.scm http-client: 'http-fetch/cached' converts strings to URIs. 2022-05-22 01:07:52 +02:00
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 least-authority: Fix typo. 2022-06-10 23:52:34 -04:00
licenses.scm licenses: Add Expat No Attribution license. 2022-05-23 16:24:47 +02:00
lint.scm lint: Extract logic of 'check-mirror-url'. 2022-09-26 23:29:36 +02:00
man-db.scm guix: Index the man-db database via man pages names. 2022-03-02 00:00:55 -05:00
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 packages: Change the order of %SUPPORTED-SYSTEMS. 2022-06-16 23:57:40 +02:00
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 progress: Rate limit drawing in the progress-reporter/bar. 2021-12-12 14:12:15 +00:00
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 status: Relay "updating substitutes" messages. 2022-06-26 23:19:14 +02:00
store.scm store: Open daemon connections with SOCK_CLOEXEC. 2022-09-04 23:10:10 +02:00
substitutes.scm substitutes: Build correct narinfo URLs for cache URLs without trailing slash. 2021-12-12 00:27:53 +01:00
svn-download.scm Merge branch 'master' into core-updates-frozen 2021-11-23 11:29:38 +01:00
swh.scm
tests.scm tests: Set a hard build timeout. 2022-02-14 11:23:07 +01:00
transformations.scm transformations: Preserve transformation order in package property. 2022-05-05 23:56:58 +02:00
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