guix-play/guix/scripts
Christopher Baines 20c08a8a45
substitute: Rework connection error handling.
This is part of trying to reduce the interdependency of code within the
substitute module.

This commit addresses some of the error handling that was performed through
open-connection-for-uri/maybe. The new approach is to use
call-with-connection-error-handling, and wrap calls to http-multiple-get and
http-fetch with that procedure, which takes care of handling connection
errors.

I think this is even slightly more rigerous than the previous setup, because
this approach handles connection errors that occur when http-multiple-get
reconnects to a host.

* guix/scripts/substitute.scm (open-connection-for-uri/maybe): Transform in to
call-with-connection-error-handling.
(fetch-narinfos): Use call-with-connection-error-handling.
(process-query): Replace open-connection-for-uri/maybe with
open-connection-for-uri/cached.
(open-connection-for-uri/cached): Set a default timeout, matching the
behaviour in open-connection-for-uri/maybe.
(process-substitution): Use call-with-connection-error-handling.
2021-02-22 20:43:12 +00:00
..
container scripts: container: Fix typo. 2019-09-23 11:56:40 -07:00
git Add 'guix git authenticate'. 2020-07-11 12:33:01 +02:00
import scripts: import: json: Fix error handling. 2021-01-31 21:49:59 +01:00
system guix system: Adjust 'upgrade-shepherd-services' to shepherd service change. 2021-01-30 18:23:52 +01:00
archive.scm archive: Note service type in ACL hint. 2021-01-20 18:49:29 +01:00
authenticate.scm authenticate: Encode strings as ISO-8859-1. 2020-09-15 14:40:20 +02:00
build.scm transformations: Show '--help-transform' only where applicable. 2020-11-21 12:39:14 +01:00
challenge.scm guix: Move narinfo code from substitute script to module. 2021-01-16 11:51:03 +00:00
container.scm scripts: Use 'define-command' and have 'guix help' use that. 2020-09-10 12:27:24 +02:00
copy.scm scripts: Use 'define-command' and have 'guix help' use that. 2020-09-10 12:27:24 +02:00
deploy.scm deploy: Let key-and-args exceptions through. 2020-11-26 23:39:15 +01:00
describe.scm guix describe: 'display-profile-content' checks the right generation. 2021-02-05 23:15:36 +01:00
discover.scm scripts: discover: Remove previous cache file. 2020-12-20 10:56:45 +01:00
download.scm scripts: Use 'define-command' and have 'guix help' use that. 2020-09-10 12:27:24 +02:00
edit.scm scripts: Use 'define-command' and have 'guix help' use that. 2020-09-10 12:27:24 +02:00
environment.scm environment: Allow starting from existing profile. 2021-02-11 17:59:07 +08:00
gc.scm scripts: Use 'define-command' and have 'guix help' use that. 2020-09-10 12:27:24 +02:00
git.scm scripts: Use 'define-command' and have 'guix help' use that. 2020-09-10 12:27:24 +02:00
graph.scm transformations: Show '--help-transform' only where applicable. 2020-11-21 12:39:14 +01:00
hash.scm guix hash: Honor '-H' when used alongside '-r'. 2021-01-04 11:51:48 +01:00
import.scm scripts: Use 'define-command' and have 'guix help' use that. 2020-09-10 12:27:24 +02:00
install.scm transformations: Show '--help-transform' only where applicable. 2020-11-21 12:39:14 +01:00
lint.scm scripts: lint: Display result of checkers on stdout. 2020-11-21 10:23:08 +00:00
offload.scm ssh: Use 'guix repl' instead of 'guile'. 2020-12-23 16:03:32 +01:00
pack.scm database: Remove #:deduplicate? from 'register-items'. 2020-12-15 17:32:11 +01:00
package.scm guix package: Add '--export-channels'. 2021-02-01 17:32:35 +01:00
perform-download.scm scripts: Use 'define-command' and have 'guix help' use that. 2020-09-10 12:27:24 +02:00
processes.scm processes: Add '--format' and the "normalized" format. 2020-11-29 23:55:57 +01:00
publish.scm publish: Add support for zstd compression. 2021-01-13 22:24:19 +01:00
pull.scm pull: Create the "${XDG_CONFIG_HOME}/guix" directory when needed. 2021-02-12 20:54:33 +08:00
refresh.scm guix: refresh: Do not use argument jumping with ngettext. 2020-11-18 20:58:51 +01:00
remove.scm scripts: Use 'define-command' and have 'guix help' use that. 2020-09-10 12:27:24 +02:00
repl.scm describe: Save the original value of (program-arguments). 2020-09-19 22:52:36 +02:00
search.scm scripts: Use 'define-command' and have 'guix help' use that. 2020-09-10 12:27:24 +02:00
show.scm scripts: Use 'define-command' and have 'guix help' use that. 2020-09-10 12:27:24 +02:00
size.scm scripts: Use 'define-command' and have 'guix help' use that. 2020-09-10 12:27:24 +02:00
substitute.scm substitute: Rework connection error handling. 2021-02-22 20:43:12 +00:00
system.scm scripts: system: Accept <image> records as input. 2021-02-17 10:57:02 +01:00
time-machine.scm scripts: Use 'define-command' and have 'guix help' use that. 2020-09-10 12:27:24 +02:00
upgrade.scm upgrade: Allow several regexps. 2020-12-01 11:34:10 +01:00
weather.scm guix: Move narinfo code from substitute script to module. 2021-01-16 11:51:03 +00:00