GNU bug report logs - #60520
[PATCH 0/4] Tests for 'guix refresh'

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Tue, 3 Jan 2023 16:45:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: 60520 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [bug#60520] [PATCH 3/4] import: stackage: Catch networking errors in predicate.
Date: Tue,  3 Jan 2023 18:03:18 +0100
* guix/import/stackage.scm (stackage-lts-package?): Wrap body in
'false-if-networking-error'.
---
 guix/import/stackage.scm | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/guix/import/stackage.scm b/guix/import/stackage.scm
index 70d3e271f4..c0284e48a4 100644
--- a/guix/import/stackage.scm
+++ b/guix/import/stackage.scm
@@ -3,7 +3,7 @@
 ;;; Copyright © 2018 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2020 Martin Becze <mjbecze <at> riseup.net>
 ;;; Copyright © 2021 Xinglu Chem <public <at> yoctocell.xyz>
-;;; Copyright © 2021 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2021, 2023, 2023 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2022 Hartmut Goebel <h.goebel <at> crazy-compilers.com>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -170,12 +170,13 @@ (define latest-lts-release
 (define (stackage-lts-package? package)
   "Return whether PACKAGE is available on the default Stackage LTS release."
   (and (hackage-package? package)
-       (let ((packages (stackage-lts-packages
-                        (stackage-lts-info-fetch %default-lts-version)))
-             (hackage-name (guix-package->hackage-name package)))
-         (find (lambda (package)
-                 (string=? (stackage-package-name package) hackage-name))
-               packages))))
+       (false-if-networking-error
+        (let ((packages (stackage-lts-packages
+                         (stackage-lts-info-fetch %default-lts-version)))
+              (hackage-name (guix-package->hackage-name package)))
+          (find (lambda (package)
+                  (string=? (stackage-package-name package) hackage-name))
+                packages)))))
 
 (define %stackage-updater
   (upstream-updater
-- 
2.38.1





This bug report was last modified 2 years and 190 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.