guix-commits
[Top][All Lists]
Advanced

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

02/03: gnu-maintenance: Handle lists returned by 'origin-uri'.


From: guix-commits
Subject: 02/03: gnu-maintenance: Handle lists returned by 'origin-uri'.
Date: Mon, 20 Jul 2020 17:45:15 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit b579b1c1d19f68435d3c919d8a9fb7bc2c238b32
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Jul 20 23:36:33 2020 +0200

    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.
---
 guix/gnu-maintenance.scm | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index 91203f5..0b5bc85 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



reply via email to

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