summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-08-10 12:06:05 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-08-26 11:38:56 -0400
commit265423266084e75877fa758691276b368e61da0a (patch)
tree6bc4c9951d1c08bcc6ab5c10946a9ee441e9f420
parentc6b5eeac92d023195f5c4adae248f2e540a09d64 (diff)
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.
-rw-r--r--guix/gnu-maintenance.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index eea75095b5..6f08e2e295 100644
--- a/guix/gnu-maintenance.scm
+++ b/guix/gnu-maintenance.scm
@@ -514,6 +514,7 @@ are unavailable."
(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 @@ are unavailable."
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 @@ are unavailable."
(() #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))