3
5
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00

Revert "gnu-maintenance: Support URI list of mixed mirrors, HTTP URLs."

This reverts commit a5b5df7f7f.  Pushed too
early.
This commit is contained in:
Maxim Cournoyer 2023-09-11 23:30:43 -04:00
parent a5b5df7f7f
commit a9d5d1d9dd
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -975,24 +975,17 @@ updater."
((url-predicate http-url?) package)))
(define* (import-html-updatable-release package #:key (version #f))
"Return the latest release of PACKAGE else #f. Do that by crawling the HTML
page of the directory containing its source tarball. Optionally include a
VERSION string to fetch a specific version."
(define (expand-uri uri)
(string->uri
(match uri
((and (? string?) (? (cut string-prefix? "mirror://" <>) url))
;; Retrieve the authoritative HTTP URL from a mirror.
(http-url? url))
((? string? url)
url)
((url _ ...)
;; This case is for when the URI is a list of possibly mirror URLs as
;; well as HTTP URLs.
(expand-uri url)))))
(let* ((uri (expand-uri (origin-uri (package-source package))))
"Return the latest release of PACKAGE. Do that by crawling the HTML page of
the directory containing its source tarball. Optionally include a VERSION
string to fetch a specific version."
(let* ((uri (string->uri
(match (origin-uri (package-source package))
((and (? string?)
(? (cut string-prefix? "mirror://" <>) url))
;; Retrieve the authoritative HTTP URL from a mirror.
(http-url? url))
((? string? url) url)
((url _ ...) url))))
(custom (assoc-ref (package-properties package)
'release-monitoring-url))
(base (or custom