[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#74542] [PATCH 07/11] import: gnome: Keep going upon HTTP errors.
From: |
Ludovic Courtès |
Subject: |
[bug#74542] [PATCH 07/11] import: gnome: Keep going upon HTTP errors. |
Date: |
Tue, 26 Nov 2024 11:33:46 +0100 |
* guix/import/gnome.scm (import-gnome-release): Do not re-raise
condition C, emit a warning instead.
Change-Id: I9a7c337a17d1f7ed4677398e7b0f383befca7d74
---
guix/import/gnome.scm | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/guix/import/gnome.scm b/guix/import/gnome.scm
index 054ae44f7a..3ba8ae02e5 100644
--- a/guix/import/gnome.scm
+++ b/guix/import/gnome.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017, 2019, 2021, 2024 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;;
@@ -23,6 +23,8 @@ (define-module (guix import gnome)
#:use-module (guix utils)
#:use-module (guix packages)
#:use-module (guix http-client)
+ #:use-module (guix diagnostics)
+ #:use-module (guix i18n)
#:use-module (json)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-34)
@@ -111,9 +113,12 @@ (define* (import-gnome-release package #:key (version #f))
releases))
(guard (c ((http-get-error? c)
- (if (= 404 (http-get-error-code c))
- #f
- (raise c))))
+ (unless (= 404 (http-get-error-code c))
+ (warning (G_ "failed to download from '~a': ~a (~s)~%")
+ (uri->string (http-get-error-uri c))
+ (http-get-error-code c)
+ (http-get-error-reason c)))
+ #f))
(let* ((port (http-fetch/cached
(string->uri (string-append
"https://ftp.gnome.org/pub/gnome/sources/"
--
2.46.0