From patchwork Sat Mar 13 21:46:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 27683 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3331027BC56; Sat, 13 Mar 2021 21:47:15 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4C64927BC55 for ; Sat, 13 Mar 2021 21:47:11 +0000 (GMT) Received: from localhost ([::1]:46126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lLC6I-00056N-Ew for patchwork@mira.cbaines.net; Sat, 13 Mar 2021 16:47:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44192) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLC6A-000554-O4 for guix-patches@gnu.org; Sat, 13 Mar 2021 16:47:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:49300) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lLC6A-000348-GX for guix-patches@gnu.org; Sat, 13 Mar 2021 16:47:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lLC6A-0000m2-Ep for guix-patches@gnu.org; Sat, 13 Mar 2021 16:47:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#47126] [PATCH 1/7] gnu-maintenance: Use (htmlprag) for 'latest-html-release'. References: <20210313214326.28052-1-ludo@gnu.org> In-Reply-To: <20210313214326.28052-1-ludo@gnu.org> Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 13 Mar 2021 21:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47126 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47126@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 47126-submit@debbugs.gnu.org id=B47126.16156719942862 (code B ref 47126); Sat, 13 Mar 2021 21:47:02 +0000 Received: (at 47126) by debbugs.gnu.org; 13 Mar 2021 21:46:34 +0000 Received: from localhost ([127.0.0.1]:60829 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lLC5h-0000k0-9U for submit@debbugs.gnu.org; Sat, 13 Mar 2021 16:46:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lLC5g-0000jh-6l for 47126@debbugs.gnu.org; Sat, 13 Mar 2021 16:46:32 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42777) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lLC5a-0002qP-GG; Sat, 13 Mar 2021 16:46:26 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=39284 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lLC5a-0004wi-2U; Sat, 13 Mar 2021 16:46:26 -0500 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Sat, 13 Mar 2021 22:46:14 +0100 Message-Id: <20210313214620.28186-1-ludo@gnu.org> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * guix/gnu-maintenance.scm (html->sxml): Remove. Autoload (htmlprag) instead. * doc/guix.texi (Requirements): Mention 'guix refresh' for the Guile-Lib dependency. --- doc/guix.texi | 3 ++- guix/gnu-maintenance.scm | 13 +------------ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 4cf241c56a..97094a7d0a 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -865,7 +865,8 @@ the @code{crate} importer (@pxref{Invoking guix import}). @item @uref{https://www.nongnu.org/guile-lib/doc/ref/htmlprag/, Guile-Lib} for -the @code{go} importer (@pxref{Invoking guix import}). +the @code{go} importer (@pxref{Invoking guix import}) and for some of +the ``updaters'' (@pxref{Invoking guix refresh}). @item When @url{http://www.bzip.org, libbz2} is available, 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 but if - ;; needed we could resort to (htmlprag) from Guile-Lib. - (call-with-input-string (string-replace-substring str "
" "
") - 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)