diff mbox series

[bug#65230,v3,06/10] gnu-maintenance: Document nested procedures in 'import-html-release'.

Message ID 77681888f701b5381cae110887308101655c987a.1692641173.git.maxim.cournoyer@gmail.com
State New
Headers show
Series [bug#65230,v3,01/10] gnu-maintenance: Make base-url argument of import-html-release required. | expand

Commit Message

Maxim Cournoyer Aug. 21, 2023, 6:06 p.m. UTC
* guix/gnu-maintenance.scm (import-html-release): Add docstring to the
'file->signature/guess' and 'url->release' nested procedures.
---

(no changes since v1)

 guix/gnu-maintenance.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index 13d6c1c7f2..9bab8e9e5f 100644
--- a/guix/gnu-maintenance.scm
+++ b/guix/gnu-maintenance.scm
@@ -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* (import-html-release base-url package
              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* (import-html-release base-url package
       (() #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))