summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-07-20 23:31:48 +0200
committerLudovic Courtès <ludo@gnu.org>2020-07-20 23:31:48 +0200
commita022f5a4c1e6176f032df93d9e88b54c00b2c0d5 (patch)
tree10329ac60db7f570528116c9ee0e2a3e011f7f1b
parent64066abdb026755062b747f3d5b0ebe0efae7fc7 (diff)
downloadguix-a022f5a4c1e6176f032df93d9e88b54c00b2c0d5.tar.gz
gnu-maintenance: Call 'adjusted-upstream-source' only when there's a source.
This is a followup to 59a47fb67853dd28891376fc970699f11c0f972f.

* guix/gnu-maintenance.scm (latest-savannah-release): Call
'adjusted-upstream-source' only when 'latest-html-release' returns
true.
(latest-kernel.org-release): Likewise.
-rw-r--r--guix/gnu-maintenance.scm19
1 files changed, 9 insertions, 10 deletions
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index 2a85504425..91203f5ca1 100644
--- a/guix/gnu-maintenance.scm
+++ b/guix/gnu-maintenance.scm
@@ -647,10 +647,10 @@ releases are on gnu.org."
          (directory (dirname (uri-path uri)))
          (rewrite   (url-prefix-rewrite %savannah-base
                                         "mirror://savannah")))
-    (adjusted-upstream-source (latest-html-release package
-                                                   #:base-url %savannah-base
-                                                   #:directory directory)
-                              rewrite)))
+    (and=> (latest-html-release package
+                                #:base-url %savannah-base
+                                #:directory directory)
+           (cut adjusted-upstream-source <> rewrite))))
 
 (define (latest-xorg-release package)
   "Return the latest release of PACKAGE."
@@ -677,12 +677,11 @@ releases are on gnu.org."
          (directory (dirname (uri-path uri)))
          (rewrite   (url-prefix-rewrite %kernel.org-base
                                         "mirror://kernel.org")))
-    (adjusted-upstream-source (latest-html-release package
-                                                   #:base-url %kernel.org-base
-                                                   #:directory directory
-                                                   #:file->signature
-                                                   file->signature)
-                              rewrite)))
+    (and=> (latest-html-release package
+                                #:base-url %kernel.org-base
+                                #:directory directory
+                                #:file->signature file->signature)
+           (cut adjusted-upstream-source <> rewrite))))
 
 (define %gnu-updater
   ;; This is for everything at ftp.gnu.org.