From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id eNJyM6QkKWZ8nwAAe85BDQ:P1 (envelope-from ) for ; Wed, 24 Apr 2024 17:26:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id eNJyM6QkKWZ8nwAAe85BDQ (envelope-from ) for ; Wed, 24 Apr 2024 17:26:29 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=SbMoozoQ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1713972388; a=rsa-sha256; cv=none; b=hFZ+vD0Cakl2FBMBaj+vemTQoicq/Cy9R3T/ApiGckkG1pzXQDt0wiWoNo8dhgBlKdN34E VQI7lEEYp34AH5o3jNjk45Ku4bWiTEzgo2tKBuLkE+PpUqjlTjN9YYNwbxebb5Edbw0QxV bzOlA7i87SqbmSHcIJea2eFmuO1OtvwX27wTq9RM3bvPCxFo5G09u8QjTAknzdJWO0j6C4 GcHuxN8bNJRRprOycrz6MWZF7h04l455amEa2NUd8Sp/BowDrlKy5CoDdSO5whe7ydSeI9 WwjfTVvLTWeRRdiA8KT/Y2KVmQ7DbHWO6N76mk9H1+M/SSGw/PW+fmLIK3QohA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=SbMoozoQ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1713972388; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=etbDxdfsQYzt0ywv4n94B4HYxCL+1156RXHq3l5H2XU=; b=K2LtC21RFPNWp/KjVgqC1rAfKqqMDjlUrulghq5PlduAJ0U/KpZ1rvhEgoEWvVYc9jbqpg d4oQNrKzb8cDfMlxpjIsmsKrV+Y7na+sdV0uu2G0kyv0sUaH4bOSjX2bcM7Bu8USaxdpFF SO8CrCNmtj4Cozno6IprKNThh6BN1PBe71RspGAlv36zxq7cFzgPOg7ZaPQN/tJV5AXS8o q7IUjIMwIqUqWTA0KPGwFtNkrzxalf5WypjIj0Co9plBo8JR7o8AiGVGFYssNMcflT2Kyw SQqfrvGzQZMwb6REXiN52f25ZzdWjPRW613Oyd8FcjeBZ9bBiwxZjFvfMz9h1g== 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 837D1E188 for ; Wed, 24 Apr 2024 17:26:28 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rzeVW-0002rA-Uz; Wed, 24 Apr 2024 11:26:02 -0400 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 1rzeVV-0002qt-D5 for bug-guix@gnu.org; Wed, 24 Apr 2024 11:26:01 -0400 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 1rzeVV-0003hw-4K for bug-guix@gnu.org; Wed, 24 Apr 2024 11:26:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rzeVl-0000lF-F3 for bug-guix@gnu.org; Wed, 24 Apr 2024 11:26:17 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#70551: channel-with-substitutes-available without network Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 24 Apr 2024 15:26:13 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70551 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 70551@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17139723412521 (code B ref -1); Wed, 24 Apr 2024 15:26:13 +0000 Received: (at submit) by debbugs.gnu.org; 24 Apr 2024 15:25:41 +0000 Received: from localhost ([127.0.0.1]:58968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rzeUz-0000ca-Ha for submit@debbugs.gnu.org; Wed, 24 Apr 2024 11:25:39 -0400 Received: from lists.gnu.org ([2001:470:142::17]:47976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rzeUq-0000aB-28 for submit@debbugs.gnu.org; Wed, 24 Apr 2024 11:25:25 -0400 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 1rzeUT-0002gK-0B for bug-guix@gnu.org; Wed, 24 Apr 2024 11:24:57 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rzeUQ-0003M4-75 for bug-guix@gnu.org; Wed, 24 Apr 2024 11:24:56 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-346a5dea2f4so1464731f8f.1 for ; Wed, 24 Apr 2024 08:24:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713972292; x=1714577092; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=etbDxdfsQYzt0ywv4n94B4HYxCL+1156RXHq3l5H2XU=; b=SbMoozoQxem/uQkSfUk0mMepLm3MS3vG9NEgTskBxXXLpX+fPTQ9wL5OCKo9WoVopN U/TeLm5W4DeWwcbcdqGrqApxPrIOJcANs0Ae8I72o4UM4X+mjubvRSwwfuLlwpRmH9eb Z88msedllxzjcp/d4M8tuAKpAX7edNYKkg9OWMdP7WDBE2lXGaNtn+DaNMuoWzLoTPvJ iXTC1Gj0TyaZNq3v2qUXO0veicH31Dw+BY16agjCk2SVsdz+gmU1L3shKZagaakcYmPe EyvF147W6CD/KvrK1t4rxcd312hjbLPGMPPpZ//3Iwg08knrz5WLPM0zK4YRSUz57Q7o tCRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713972292; x=1714577092; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=etbDxdfsQYzt0ywv4n94B4HYxCL+1156RXHq3l5H2XU=; b=SqnYA531neo/RcCfiuo+Mrp3v8En+PUtD0uHAZ0jPBFuLuQwMcatnX4kyQlt9No6xU /x5xt+Vcj12zB8O+flQulJrTjdJVUFIgaCmL2x+Dx7zSdU397LM06zkBnEjQJ2a8Yyeo W4zgxqojHVCF2j9fr8CT4bFtoQToVibMatHItE8/w1HB80dSHA+3Zoljw0eRFe5w0zk9 T0n/qMyGy/G8ku186jh+7pmr43OJwGJchMXMs7fBpt5CzWgzM6RaHTdeeAi0PdFlHcw2 oESakD440LUAeGxtXG4vAFIWOXSxVz0LTJxR3bTOH5A4Ex7K1Tb/NwgB7tnDuqXIiy03 B11A== X-Gm-Message-State: AOJu0Yy/nfLfO4N8tmMHhswM66ppnLblvGSqJ1uw1V3ExpEJSa82D9NO ASi8+rxik/LdCMTnVCeKaoouZpSh/0x/OXPu8PdjKJtCzO5o29TBQj2mAQ== X-Google-Smtp-Source: AGHT+IG0eGZaLwvFyn9durPIJH/P3D5bjsrusDFtLbQuEW9dovzpGrg/2d6d9OQWE5/6ZhpbKvSfuA== X-Received: by 2002:a05:600c:1394:b0:41a:408c:579c with SMTP id u20-20020a05600c139400b0041a408c579cmr2223845wmf.1.1713972291932; Wed, 24 Apr 2024 08:24:51 -0700 (PDT) Received: from lili ([2a02:8440:3141:57c1:dedd:6b78:47bb:2a74]) by smtp.gmail.com with ESMTPSA id p9-20020a05600c358900b00419f7b73c55sm15829864wmq.0.2024.04.24.08.24.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 08:24:50 -0700 (PDT) From: Simon Tournier Date: Wed, 24 Apr 2024 16:43:14 +0200 Message-ID: <87jzkmbz3x.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -5.29 X-Migadu-Queue-Id: 837D1E188 X-Migadu-Spam-Score: -5.29 X-Migadu-Scanner: mx10.migadu.com X-TUID: ibZnMGmrzbTs --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Out of any network, I get this error: --8<---------------cut here---------------start------------->8--- $ guix time-machine --commit=3D1971d11d -- describe guix time-machine: error: failed to load '/home/simon/.config//guix/channel= s.scm': guix/build/download.scm:399:8: In procedure open-socket-for-uri: In procedure getaddrinfo: Name or service not known --8<---------------cut here---------------end--------------->8--- And that=E2=80=99s annoying. It comes from: $ cat /home/simon/.config//guix/channels.scm (use-modules (guix ci)) (list (channel-with-substitutes-available %default-guix-channel "https://ci.guix.gnu.org")) as documented by section =E2=80=9CChannels with Substitutes=E2=80=9D [1]. Specifically, the error is raised by the procedure =E2=80=99load*=E2=80=99 = called by =E2=80=99channel-list=E2=80=99 inside =E2=80=99load-channels=E2=80=99. Oth= er said, =E2=80=99load*=E2=80=99 runs the procedure =E2=80=99channel-with-substitutes-available=E2=80=99 which asks n= etwork via the procedure =E2=80=99find-latest-commit-with-substitutes=E2=80=99. I think this is incorrect; the correct behaviour seems trying to do as most as possible. With the attached patch, I get: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix time-machine --commit=3D1971d11d -- describe guix time-machine: warning: could not find available substitutes at https:/= /ci.guix.gnu.org guix 1971d11 repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: 1971d11db9ed9683d5036cd4c62deb564842e1f6 --8<---------------cut here---------------end--------------->8--- Obviously, the option =E2=80=99-q=E2=80=99 allows to bypass the problem. :-= ) However, it=E2=80=99s annoying because the default file channels.scm can be complex = and it still should work without any tweak, IMHO. Well, the proposed fix is here to catch the error; maybe it could be finer than #t. WDYT? Cheers, simon 1: https://guix.gnu.org/manual/devel/en/guix.html#Channels-with-Substitutes --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-ci-Catch-error-for-channel-with-substitutes.patch Content-Description: p.patch >From 5955a4c3f913d1aa77ec3a27d6430f3dcf22aab6 Mon Sep 17 00:00:00 2001 Message-ID: <5955a4c3f913d1aa77ec3a27d6430f3dcf22aab6.1713969693.git.zimon.toutoune@gmail.com> From: Simon Tournier Date: Wed, 24 Apr 2024 16:39:10 +0200 Subject: [PATCH] ci: Catch error for channel with substitutes. * guix/ci.scm (channel-with-substitutes-available): Catch all error when running 'find-latest-commit-with-substitutes'. Move the warning when failing. Change-Id: I352e07f14417f77c7ebf0f40a01c6a2e58b15d78 --- guix/ci.scm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/guix/ci.scm b/guix/ci.scm index 5d16ee69d0..b2077448b0 100644 --- a/guix/ci.scm +++ b/guix/ci.scm @@ -336,10 +336,13 @@ (define (channel-with-substitutes-available chan url) If no commit with available substitutes were found, the commit field is set to false and a warning message is printed." - (let ((commit (find-latest-commit-with-substitutes url))) - (unless commit - (warning (G_ "could not find available substitutes at ~a~%") - url)) + (let ((commit (catch #t + (lambda () + (find-latest-commit-with-substitutes url)) + (lambda _ + (warning (G_ "could not find available substitutes at ~a~%") + url) + #false)))) (channel (inherit chan) (commit commit)))) base-commit: 10d0e2d3110e4be2bc6cfecb9a3abb83d8e1ddd6 -- 2.41.0 --=-=-=--