summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-07-20 23:36:33 +0200
committerLudovic Courtès <ludo@gnu.org>2020-07-20 23:36:33 +0200
commitb579b1c1d19f68435d3c919d8a9fb7bc2c238b32 (patch)
tree8c40fc73726cf98e0c467d3bb9bbd34e6805f189 /guix
parenta022f5a4c1e6176f032df93d9e88b54c00b2c0d5 (diff)
gnu-maintenance: Handle lists returned by 'origin-uri'.
This fixes "guix refresh man-pages", for instance. * guix/gnu-maintenance.scm (latest-savannah-release) (latest-kernel.org-release): Handle the case where 'origin-uri' returns a list.
Diffstat (limited to 'guix')
-rw-r--r--guix/gnu-maintenance.scm10
1 files changed, 8 insertions, 2 deletions
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index 91203f5ca1..0b5bc8592c 100644
--- a/guix/gnu-maintenance.scm
+++ b/guix/gnu-maintenance.scm
@@ -642,7 +642,10 @@ releases are on gnu.org."
(define (latest-savannah-release package)
"Return the latest release of PACKAGE."
- (let* ((uri (string->uri (origin-uri (package-source package))))
+ (let* ((uri (string->uri
+ (match (origin-uri (package-source package))
+ ((? string? uri) uri)
+ ((uri mirrors ...) uri))))
(package (package-upstream-name package))
(directory (dirname (uri-path uri)))
(rewrite (url-prefix-rewrite %savannah-base
@@ -672,7 +675,10 @@ releases are on gnu.org."
(define (file->signature file)
(string-append (file-sans-extension file) ".sign"))
- (let* ((uri (string->uri (origin-uri (package-source package))))
+ (let* ((uri (string->uri
+ (match (origin-uri (package-source package))
+ ((? string? uri) uri)
+ ((uri mirrors ...) uri))))
(package (package-upstream-name package))
(directory (dirname (uri-path uri)))
(rewrite (url-prefix-rewrite %kernel.org-base