mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-27 14:52:05 -05:00
gnu-maintenance: Document nested procedures in 'import-html-release'.
* guix/gnu-maintenance.scm (import-html-release): Add docstring to the 'file->signature/guess' and 'url->release' nested procedures.
This commit is contained in:
parent
c6b5eeac92
commit
2654232660
1 changed files with 4 additions and 1 deletions
|
@ -514,6 +514,7 @@ (define* (import-html-release base-url package
|
|||
(string-append base-url directory "/")))
|
||||
(links (url->links url)))
|
||||
(define (file->signature/guess url)
|
||||
"Return the first link that matches a signature extension, else #f."
|
||||
(let ((base (basename url)))
|
||||
(any (lambda (link)
|
||||
(any (lambda (extension)
|
||||
|
@ -524,6 +525,8 @@ (define (file->signature/guess url)
|
|||
links)))
|
||||
|
||||
(define (url->release url)
|
||||
"Return an <upstream-source> object if a release file was found at URL,
|
||||
else #f."
|
||||
(let* ((base (basename url))
|
||||
(base-url (string-append base-url directory))
|
||||
(url (cond ((and=> (string->uri url) uri-scheme) ;full URL?
|
||||
|
@ -574,7 +577,7 @@ (define candidates
|
|||
(() #f)
|
||||
((first . _)
|
||||
(if version
|
||||
;; find matching release version and return it
|
||||
;; Find matching release version and return it.
|
||||
(find (lambda (upstream)
|
||||
(string=? (upstream-source-version upstream) version))
|
||||
(coalesce-sources candidates))
|
||||
|
|
Loading…
Reference in a new issue