gnu-maintenance: 'generic-html' updates packages with the right property.
authorLudovic Courtès <ludo@gnu.org>
Sun, 4 Apr 2021 13:40:39 +0000 (15:40 +0200)
committerLudovic Courtès <ludo@gnu.org>
Mon, 5 Apr 2021 10:03:08 +0000 (12:03 +0200)
* guix/gnu-maintenance.scm (html-updatable-package?): Return true for
packages with a 'release-monitoring-url' property.  This allows us to
cater for packages with source fetched over, say, FTP, but with an HTML
page to monitor.

guix/gnu-maintenance.scm

index 4078e1f..eff26cc 100644 (file)
@@ -706,14 +706,19 @@ GNOME packages; EMMS is included though, because its releases are on gnu.org."
                          "ftp.gnu.org" "download.savannah.gnu.org"
                          "pypi.org" "crates.io" "rubygems.org"
                          "bioconductor.org")))
-    (url-predicate (lambda (url)
-                     (match (string->uri url)
-                       (#f #f)
-                       (uri
-                        (let ((scheme (uri-scheme uri))
-                              (host   (uri-host uri)))
-                          (and (memq scheme '(http https))
-                               (not (member host hosting-sites))))))))))
+    (define http-url?
+      (url-predicate (lambda (url)
+                       (match (string->uri url)
+                         (#f #f)
+                         (uri
+                          (let ((scheme (uri-scheme uri))
+                                (host   (uri-host uri)))
+                            (and (memq scheme '(http https))
+                                 (not (member host hosting-sites)))))))))
+
+    (lambda (package)
+      (or (assoc-ref (package-properties package) 'release-monitoring-url)
+          (http-url? package)))))
 
 (define (latest-html-updatable-release package)
   "Return the latest release of PACKAGE.  Do that by crawling the HTML page of