guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/11: gnu-maintenance: 'gnu' and 'gnu-ftp' predicates catch networking


From: guix-commits
Subject: 02/11: gnu-maintenance: 'gnu' and 'gnu-ftp' predicates catch networking errors.
Date: Sun, 8 Jan 2023 10:14:20 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 472dd29f37d13897ddda736fa3fda964bacf1c39
Author: Ludovic Court├Ęs <ludo@gnu.org>
AuthorDate: Tue Jan 3 14:53:03 2023 +0100

    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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]