Revert "gnu-maintenance: Support URI list of mixed mirrors, HTTP URLs."
This reverts commit a5b5df7f7f
. Pushed too
early.
master
parent
a5b5df7f7f
commit
a9d5d1d9dd
|
@ -975,24 +975,17 @@ updater."
|
||||||
((url-predicate http-url?) package)))
|
((url-predicate http-url?) package)))
|
||||||
|
|
||||||
(define* (import-html-updatable-release package #:key (version #f))
|
(define* (import-html-updatable-release package #:key (version #f))
|
||||||
"Return the latest release of PACKAGE else #f. Do that by crawling the HTML
|
"Return the latest release of PACKAGE. Do that by crawling the HTML page of
|
||||||
page of the directory containing its source tarball. Optionally include a
|
the directory containing its source tarball. Optionally include a VERSION
|
||||||
VERSION string to fetch a specific version."
|
string to fetch a specific version."
|
||||||
|
(let* ((uri (string->uri
|
||||||
(define (expand-uri uri)
|
(match (origin-uri (package-source package))
|
||||||
(string->uri
|
((and (? string?)
|
||||||
(match uri
|
(? (cut string-prefix? "mirror://" <>) url))
|
||||||
((and (? string?) (? (cut string-prefix? "mirror://" <>) url))
|
;; Retrieve the authoritative HTTP URL from a mirror.
|
||||||
;; Retrieve the authoritative HTTP URL from a mirror.
|
(http-url? url))
|
||||||
(http-url? url))
|
((? string? url) url)
|
||||||
((? string? url)
|
((url _ ...) 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))))
|
|
||||||
(custom (assoc-ref (package-properties package)
|
(custom (assoc-ref (package-properties package)
|
||||||
'release-monitoring-url))
|
'release-monitoring-url))
|
||||||
(base (or custom
|
(base (or custom
|
||||||
|
|
Reference in New Issue