>From e9dfdc3a2031c25043cc8b6f4b08656d05024c16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Date: Mon, 24 Oct 2022 16:35:18 +0800 Subject: [PATCH] gnu-maintenance: Don't try html updater on 'mirror://' urls. This fixes . * guix/gnu-maintenance.scm (latest-html-updatable-release): Use the first http or https url for updating. --- guix/gnu-maintenance.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index 10a6ec05f1..4cd501e492 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -806,10 +806,16 @@ (define http-url? (define (latest-html-updatable-release package) "Return the latest release of PACKAGE. Do that by crawling the HTML page of the directory containing its source tarball." + (define (http-url? url) + (match (string->uri url) + (#f #f) + (uri (let ((scheme (uri-scheme uri))) + (memq scheme '(http https)))))) (let* ((uri (string->uri (match (origin-uri (package-source package)) ((? string? url) url) - ((url _ ...) url)))) + ;; We need filter out possibly 'mirror://' urls. + ((? list? urls) (first (filter http-url? urls)))))) (custom (assoc-ref (package-properties package) 'release-monitoring-url)) (base (or custom -- 2.37.3