Ludovic Courtès 8af9a2aa5f
substitute: If a server's nar URL is 404, try the next one(s).
If a substitute server advertises in its narinfo, for example, both a
/zstd and a /lzip URL but the /zstd URL is unreachable, try the /lzip
URL.

Fixes <https://issues.guix.gnu.org/63634>.

* guix/narinfo.scm (narinfo-preferred-uris): New procedure.
(narinfo-best-uri): Rebase on top of it.
* guix/scripts/substitute.scm (download-nar)[try-fetch]: New procedure.
Use 'narinfo-preferred-uris' and 'try-fetch' to attempt all the URLs of
NARINFO.
* tests/substitute.scm (request-substitution): Remove 'parameterize'.
Delete DESTINATION.
("substitute, preferred nar URL is 404, other is 200"): New test.
2023-05-30 00:15:29 +02:00
..
2017-01-26 13:49:56 +01:00
2020-12-21 17:47:35 +01:00
2022-05-22 01:07:52 +02:00
2022-11-11 23:17:42 +01:00
2020-12-09 22:25:17 +01:00
2021-09-28 22:00:47 +02:00
2022-11-11 23:17:42 +01:00
2022-06-15 10:18:34 +02:00
2021-04-12 18:42:22 +02:00
2021-12-23 10:54:00 +01:00
2022-09-29 22:59:48 +02:00
2023-02-19 21:13:23 -05:00
2019-03-24 00:13:53 +01:00
2019-04-10 17:09:47 +02:00
2023-05-18 20:01:32 +02:00
2019-06-14 21:57:39 +02:00
2017-11-17 10:47:49 +01:00