summary refs log tree commit diff
path: root/guix/gnu-maintenance.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-03-13 12:39:34 +0100
committerLudovic Courtès <ludo@gnu.org>2021-03-17 12:03:24 +0100
commit71f6acd28df098fa600861df49347a315ffc7bb5 (patch)
treeaf0550f44a723fdd9646fe9cd7f977fc73e85e60 /guix/gnu-maintenance.scm
parent62a091368df3bab499142d06f5114a73915c71f2 (diff)
downloadguix-71f6acd28df098fa600861df49347a315ffc7bb5.tar.gz
gnu-maintenance: Use (htmlprag) for 'latest-html-release'.
* guix/gnu-maintenance.scm (html->sxml): Remove.  Autoload (htmlprag)
instead.
* doc/guix.texi (Requirements): Mention 'guix refresh' for the Guile-Lib
dependency.
Diffstat (limited to 'guix/gnu-maintenance.scm')
-rw-r--r--guix/gnu-maintenance.scm13
1 files changed, 1 insertions, 12 deletions
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index 9e393d18cd..febed57c3a 100644
--- a/guix/gnu-maintenance.scm
+++ b/guix/gnu-maintenance.scm
@@ -38,6 +38,7 @@
   #:use-module (guix upstream)
   #:use-module (guix packages)
   #:autoload   (zlib) (call-with-gzip-input-port)
+  #:autoload   (htmlprag) (html->sxml)            ;from Guile-Lib
   #:export (gnu-package-name
             gnu-package-mundane-name
             gnu-package-copyright-holder
@@ -447,18 +448,6 @@ hosted on ftp.gnu.org, or not under that name (this is the case for
 ;;; Latest HTTP release.
 ;;;
 
-(define (html->sxml port)
-  "Read HTML from PORT and return the corresponding SXML tree."
-  (let ((str (get-string-all port)))
-    (catch #t
-      (lambda ()
-        ;; XXX: This is the poor developer's HTML-to-XML converter.  It's good
-        ;; enough for directory listings at <https://kernel.org/pub> but if
-        ;; needed we could resort to (htmlprag) from Guile-Lib.
-        (call-with-input-string (string-replace-substring str "<hr>" "<hr />")
-          xml->sxml))
-      (const '(html)))))                          ;parse error
-
 (define (html-links sxml)
   "Return the list of links found in SXML, the SXML tree of an HTML page."
   (let loop ((sxml sxml)