diff options
author | Ludovic Courtès <ludo@gnu.org> | 2023-01-03 14:53:03 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2023-01-08 16:11:45 +0100 |
commit | 472dd29f37d13897ddda736fa3fda964bacf1c39 (patch) | |
tree | 3f56ccdee93c3b8a3121ace2d010117614ce7f7f | |
parent | f3edf29c67b50de888ff23c771b4cbe3e8142656 (diff) | |
download | guix-472dd29f37d13897ddda736fa3fda964bacf1c39.tar guix-472dd29f37d13897ddda736fa3fda964bacf1c39.tar.gz |
gnu-maintenance: 'gnu' and 'gnu-ftp' predicates catch networking errors.
Previously, in a networking-less environment such as 'guix shell -C -D
guix', 'guix refresh --list-updaters' would crash due to a
'gettaddrinfo-error' exception in these predicates.
* guix/gnu-maintenance.scm (%gnu-updater)[pred]: Wrap in
'false-if-networking-error'.
(%gnu-ftp-updater)[pred]: Likewise.
-rw-r--r-- | guix/gnu-maintenance.scm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index 0418c297f2..0aa70243b5 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -883,7 +883,8 @@ string to fetch a specific version." (upstream-updater (name 'gnu) (description "Updater for GNU packages") - (pred gnu-hosted?) + (pred (lambda (package) + (false-if-networking-error (gnu-hosted? package)))) (import import-gnu-release))) (define %gnu-ftp-updater @@ -893,8 +894,9 @@ string to fetch a specific version." (name 'gnu-ftp) (description "Updater for GNU packages only available via FTP") (pred (lambda (package) - (and (not (gnu-hosted? package)) - (pure-gnu-package? package)))) + (false-if-networking-error + (and (not (gnu-hosted? package)) + (pure-gnu-package? package))))) (import import-release*))) (define %savannah-updater |