From: "宋文武 via Bug reports for GNU Guix" <bug-guix@gnu.org>
To: Maxime Devos <maximedevos@telenet.be>
Cc: kiasoc5 <kiasoc5@disroot.org>, 58697@debbugs.gnu.org
Subject: bug#58697: [bug] guix refresh nftables crashes
Date: Mon, 24 Oct 2022 16:44:02 +0800 [thread overview]
Message-ID: <87y1t5pq5p.fsf@envs.net> (raw)
In-Reply-To: <13f90fdb-fdbe-2a3e-9e5f-2d15bccf10a0@telenet.be> (Maxime Devos's message of "Sat, 22 Oct 2022 11:56:35 +0200")
[-- Attachment #1: Type: text/plain, Size: 617 bytes --]
Maxime Devos <maximedevos@telenet.be> writes:
> On 22-10-2022 03:55, kiasoc5 via Bug reports for GNU Guix wrote:
>> % guix refresh nftables
>> [...]
>> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
>> In procedure getaddrinfo: Servname not supported for ai_socktype
>> ```
>
> I can reproduce this locally and don't know the cause.
>
It happens when the origin have both 'mirror://' and 'http://' urls,
current the html updater check for any url match 'http' or 'https', but
when updating it will just pick the first url, so when the first is
'mirror://' this error will come.
This patch should fix it:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-maintenance-Don-t-try-html-updater-on-mirror-url.patch --]
[-- Type: text/x-patch, Size: 1552 bytes --]
From e9dfdc3a2031c25043cc8b6f4b08656d05024c16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@member.fsf.org>
Date: Mon, 24 Oct 2022 16:35:18 +0800
Subject: [PATCH] gnu-maintenance: Don't try html updater on 'mirror://' urls.
This fixes <https://issues.guix.gnu.org/58697>.
* guix/gnu-maintenance.scm (latest-html-updatable-release): Use the first http
or https url for updating.
---
guix/gnu-maintenance.scm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index 10a6ec05f1..4cd501e492 100644
--- a/guix/gnu-maintenance.scm
+++ b/guix/gnu-maintenance.scm
@@ -806,10 +806,16 @@ (define http-url?
(define (latest-html-updatable-release package)
"Return the latest release of PACKAGE. Do that by crawling the HTML page of
the directory containing its source tarball."
+ (define (http-url? url)
+ (match (string->uri url)
+ (#f #f)
+ (uri (let ((scheme (uri-scheme uri)))
+ (memq scheme '(http https))))))
(let* ((uri (string->uri
(match (origin-uri (package-source package))
((? string? url) url)
- ((url _ ...) url))))
+ ;; We need filter out possibly 'mirror://' urls.
+ ((? list? urls) (first (filter http-url? urls))))))
(custom (assoc-ref (package-properties package)
'release-monitoring-url))
(base (or custom
--
2.37.3
next prev parent reply other threads:[~2022-10-24 10:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-22 1:55 bug#58697: [bug] guix refresh nftables crashes kiasoc5 via Bug reports for GNU Guix
2022-10-22 9:56 ` Maxime Devos
2022-10-24 8:44 ` 宋文武 via Bug reports for GNU Guix [this message]
2023-09-12 3:40 ` Maxim Cournoyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y1t5pq5p.fsf@envs.net \
--to=bug-guix@gnu.org \
--cc=58697@debbugs.gnu.org \
--cc=iyzsong@envs.net \
--cc=kiasoc5@disroot.org \
--cc=maximedevos@telenet.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).