From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id wGyUGwKlRWcwgQEA62LTzQ:P1 (envelope-from ) for ; Tue, 26 Nov 2024 10:37:54 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id wGyUGwKlRWcwgQEA62LTzQ (envelope-from ) for ; Tue, 26 Nov 2024 11:37:54 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=mEfTtM7f; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=APGgY+MM; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1732617474; a=rsa-sha256; cv=none; b=DVZEDGRgkbJEEeA8mc68QKNqCJbsV6a9UduZO03jINquIGii68xDl5lmaEuxmFmBg/PGWm B45EhNy0wdHgrZTb4CvUSUXN1uUsj/g2D7aycKaAhw/TpO8AwUvU3Es204mBx52SVQquqV rGHdYxUnQ/M+YvlkR/qHh3tiM08AslJ7bjFZ/jA8pxAm2ONe88tHZZRmHBbn9HSAD9mym2 2AzXDKct5wlFlCJLa5ntdqpEzZsy0TEoez8NC9THjseY1jGmZo5yiubzi6vYCNHlICdI5t r3Urouslx8CbsIFO5CaOYG3ItgjyN66FBc4xdDtIUe0wQ0mO6eUTorKarZZn7w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=mEfTtM7f; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=APGgY+MM; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1732617474; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=gUsH8apnherpQShGuu1InrWaP5q5OLB8UdwDPUoWXik=; b=nujxtNup6QxVhAWbg/kIFm95adMZJWeh9bm7Du4GblTbyghqzuls+E5iliAHDGwJ5zKE8r 69CO/ujjuLDacJ3fqCl0nMq5041OB5PUjGllAebus18jv9nrj1wCQ86mFca+DF2rHubfAz rmrFt3kOK3YFawGCHtmQe63gv13rIvQ6G9mfsuTCZb7yeX3mdW7K4PZRUd8DPrfWh6wzvE ECbIm478aMeRXo5evJIcObExDLa8nTVffXxU3GkWg5e+U7BZZwUHmGAqyXEDrM91NwgWsS 7v4HiN17bRh25PLejA81D9iHL0GZB1OC0VX8K5EfnSSCkN3rH/2QWKFGYWHp5A== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 263967CF69 for ; Tue, 26 Nov 2024 11:37:54 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFswb-0005Kd-1H; Tue, 26 Nov 2024 05:37:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFswL-0005IL-1y for guix-patches@gnu.org; Tue, 26 Nov 2024 05:37:05 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFswJ-0000oq-Fz; Tue, 26 Nov 2024 05:37:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=gUsH8apnherpQShGuu1InrWaP5q5OLB8UdwDPUoWXik=; b=mEfTtM7fY+b1+dwPxKDWCYUrvj7NB/9022aC57NJ49QlqsQA8B2zxjIggQ1D+6OaLjzpBl7hdfd4RR8zMqmvG4L3mRM+gKkRA9Ve8sLWla+XSkYhTKAkvj95nEHFE0MaE4FUQsjwSpo3lfV/tjpk/3QK///xZLnitpHSwYGBjefD0mNBfMEMqzEzooOktRwwlEgtz9NwwFUvqHTlNF9tqR5PlXFbuQQQRPy7IiK4h7rfQft260EL1DX9xH7zoyanVGbJfmflD3dnNRwHHA720ve9atMTKvgrBuuzEe5MDxe5u22PEmyGW/H/Msr3VZGN76/9zzjmLWQCSwNoiUaCmQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tFswI-0002dk-Oo; Tue, 26 Nov 2024 05:37:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74542] [PATCH 02/11] gnu-maintenance: =?UTF-8?Q?=E2=80=98import-html-release=E2=80=99_?= =?UTF-8?Q?doesn=E2=80=99t?= abort upon HTTP 404. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Tue, 26 Nov 2024 10:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74542 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74542@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Ludovic Court?s , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic Court?s , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 74542-submit@debbugs.gnu.org id=B74542.173261739310023 (code B ref 74542); Tue, 26 Nov 2024 10:37:02 +0000 Received: (at 74542) by debbugs.gnu.org; 26 Nov 2024 10:36:33 +0000 Received: from localhost ([127.0.0.1]:46188 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFsvp-0002bS-0r for submit@debbugs.gnu.org; Tue, 26 Nov 2024 05:36:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFsvj-0002aS-4s for 74542@debbugs.gnu.org; Tue, 26 Nov 2024 05:36:28 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFstX-00004u-Fy; Tue, 26 Nov 2024 05:34:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=gUsH8apnherpQShGuu1InrWaP5q5OLB8UdwDPUoWXik=; b=APGgY+MM1KX4NwTN5iDa 5RvtVLSsxL4cojmXVBpQgEakF5S7dT19F3c0wxUVZNXDk4CT7NgpSkFDqSG5kLAK0PJUN6gitRhad LRiExovN37DX9X/sRkTQqXcOTRIj93Hd6WNbltsBSBf7hUh4O7sKccGlLjLKb23iBjqZYS0gZTieT jZSZevj0CL7iZPK4/9ahHSnJvTTtPsz6GC2Te9raJiqg/5Ro5xWqrLDKtpIiNv4V16UP9AZGaYP7K 4QDbl7gkCT6dISKqxUyacO1qmooUdmIpLBtyaB1cRnCkS8cG2XfxML3D2nMAyiN2JXnlGCS8lqKRh zvBwx33lUNdqNA==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Tue, 26 Nov 2024 11:33:41 +0100 Message-ID: <92c108d975939b5dece3fb86ac7bce1edaf619a4.1732615193.git.ludo@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 263967CF69 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -1.99 X-Spam-Score: -1.99 X-TUID: eiO7YCZtscnw Previously, updaters using ‘import-html-release’ would throw to 'quit when the HTML page isn’t found, aborting the whole process: $ guix refresh coreutils libchop guix refresh: error: https://de.freedif.org/savannah//libchop/: HTTP download failed: 404 ("Not Found") * guix/gnu-maintenance.scm (url->links): Guard against ‘http-get-error?’ and return the empty list when it is raised. Change-Id: I419ff96ddb424aa8c74d6bab3d66a5e85355c3dc --- guix/gnu-maintenance.scm | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index 881e941fbf..f34dcfc13f 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2010-2023 Ludovic Courtès +;;; Copyright © 2010-2024 Ludovic Courtès ;;; Copyright © 2012, 2013 Nikita Karetnikov ;;; Copyright © 2021 Simon Tournier ;;; Copyright © 2022 Maxime Devos @@ -30,6 +30,7 @@ (define-module (guix gnu-maintenance) #:use-module (srfi srfi-2) #:use-module (srfi srfi-11) #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) #:use-module (rnrs io ports) #:use-module ((guix http-client) #:hide (open-socket-for-uri)) ;; not required in many cases, so autoloaded to reduce start-up costs. @@ -496,11 +497,16 @@ (define (html-links sxml) (define (url->links url) "Return the unique links on the HTML page accessible at URL." - (let* ((uri (string->uri url)) - (port (http-fetch/cached uri #:ttl 3600)) - (sxml (html->sxml port))) - (close-port port) - (delete-duplicates (html-links sxml)))) + (guard (c ((http-get-error? c) + (warning (G_ "failed to download '~a': ~a (~a)~%") + url (http-get-error-code c) + (http-get-error-reason c)) + '())) + (let* ((uri (string->uri url)) + (port (http-fetch/cached uri #:ttl 3600)) + (sxml (html->sxml port))) + (close-port port) + (delete-duplicates (html-links sxml))))) (define (canonicalize-url url base-url) "Make relative URL absolute, by appending URL to BASE-URL as required. If -- 2.46.0