From 472dd29f37d13897ddda736fa3fda964bacf1c39 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 3 Jan 2023 14:53:03 +0100 Subject: 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. --- guix/gnu-maintenance.scm | 8 +++++--- 1 file 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 -- cgit 1.4.1