From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id WNVWK3tjYWF0nQAAgWs5BA (envelope-from ) for ; Sat, 09 Oct 2021 11:40:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 2RDkJXtjYWEIMwAAbx9fmQ (envelope-from ) for ; Sat, 09 Oct 2021 09:40:11 +0000 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 E4E381362F for ; Sat, 9 Oct 2021 11:40:10 +0200 (CEST) Received: from localhost ([::1]:54768 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mZ8pt-0003e2-Vz for larch@yhetil.org; Sat, 09 Oct 2021 05:40:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56324) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mZ8pm-0003do-Q7 for guix-patches@gnu.org; Sat, 09 Oct 2021 05:40:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40762) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mZ8pm-0000Gf-Hy for guix-patches@gnu.org; Sat, 09 Oct 2021 05:40:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mZ8pm-0003Ky-6C for guix-patches@gnu.org; Sat, 09 Oct 2021 05:40:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51091] [PATCH] guix: opam: Do not fail when refreshing. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 09 Oct 2021 09:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51091 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Julien Lepiller , 51091@debbugs.gnu.org Received: via spool by 51091-submit@debbugs.gnu.org id=B51091.163377238412794 (code B ref 51091); Sat, 09 Oct 2021 09:40:02 +0000 Received: (at 51091) by debbugs.gnu.org; 9 Oct 2021 09:39:44 +0000 Received: from localhost ([127.0.0.1]:52308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZ8pT-0003KH-U2 for submit@debbugs.gnu.org; Sat, 09 Oct 2021 05:39:44 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:59658 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZ8pR-0003Jv-3K for 51091@debbugs.gnu.org; Sat, 09 Oct 2021 05:39:42 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1633772372; bh=8fnKFShsYhpF8i/4Xkd3GtR98RPZHxb6HhtLrO/4ZpM=; h=From:To:Subject:In-Reply-To:References:Date; b=Z9k2VQAt4aWeuLDMLNQgpdtdj5NhHcoi2GLr7F5wZ+y34/nAQpQboq2+5IibPgWB1 +sq1tfhUwIhhkKVIOkxyHocUysTt3AVxCy9h32muqJCI9TC+P8GrLQ4JLrAj3Hsxuh JJpKuF+gxb9y/LgOP1l3V2QOT+UJpCn8ZBM9PJ5c= In-Reply-To: <20211008050310.407d6b23@tachikoma.lepiller.eu> References: <20211008050310.407d6b23@tachikoma.lepiller.eu> Date: Sat, 09 Oct 2021 11:39:23 +0200 Message-ID: <87y272lepg.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633772411; 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:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=LZlX+bcNIU+rDiQCHbJldaph3tmkxz4CHE9Mr3IgAOw=; b=ofzSHoMC8lNv1QTMRFCUSCC/80kPreM1sNSeRsOxbwt3sIQKLDKtMKGpmqzmKpkY5B94HD IADX5JZLwpxQP82um3x01QkbeWpSfrHCJ/jNGwWLsjuJziO/ewRZejOUj8aTHL38eqKlEu wAjZoAUyeSxiRnVgUWHrIxTg6IB1v++6f4U5O1Bq/hkJGz1NwO1VNUsqV0GZOZ2zSRl7i7 ZydnFM4HbFPqiPuH+xJv0MOTGRLmo7WF/vW8bQj/Tf3zN1EMbcx1uq3a0cjHrYVymXLd/G n/H9M2J7LXsDes6xf4i5405QekVqHzxhk/S6Pqc2Nmg3qxBs/TqC7EVW7wFMOg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633772411; a=rsa-sha256; cv=none; b=H5jjjj6N88qHv5baLJGsiNeg4LAszxAZxSTDYZr5i9cNN6JamDFQd1k3P7ics8vocsZVya ib6vJxFUDpb7pVfJoyZYuGqdvm/LM55cSrBINo/0yaYuWrn0GBMdDBPubrntRbj7ognQVZ CuYWtMdbiXQPbwubgk7koT4Ofq12g9u+erqtWObSm7qU4Mij0X5TB9rx/qc3fuxzCtUoO2 N01iFGYamqnCdqtmwSy/E75pohceynBx4XOa6pNHLCOwCyxuEDddlmmOAzgSZSyNLoqvey GqLCLAAtiwbZhGa62hJJCNVkh/M8YahGOnozb2bun5Ttc/m8F5G4/H1RSx79fw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=Z9k2VQAt; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -3.41 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=Z9k2VQAt; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: E4E381362F X-Spam-Score: -3.41 X-Migadu-Scanner: scn0.migadu.com X-TUID: xT7xHTbh+BiI --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Fri, Oct 08 2021, Julien Lepiller wrote: > Hi Guix! > > the attached patch prevents early failures in "guix refresh -t opam". > It will now simply continue when it encounters a package that is not in > the opam repository. > From f6260b762dd78772e0d90d96dd92d22346a09007 Mon Sep 17 00:00:00 2001 > From: Julien Lepiller > Date: Fri, 8 Oct 2021 04:58:27 +0200 > Subject: [PATCH] guix: opam: Do not fail when refreshing. > > Because we throw an error when a package is not in the opam repository, > the updater would crash when encountering a package that is not in opam > but uses the ocaml-build-system, such as opam itself. This catches the > error and continues without updating said package, and lets us update > the rest of the packages. > > * guix/import/opam.scm (latest-release): Catch errors and do not crash. > --- > guix/import/opam.scm | 23 +++++++++++++---------- > 1 file changed, 13 insertions(+), 10 deletions(-) > > diff --git a/guix/import/opam.scm b/guix/import/opam.scm > index fe13d29f03..8ff1a3ae63 100644 > --- a/guix/import/opam.scm > +++ b/guix/import/opam.scm > @@ -409,16 +409,19 @@ package in OPAM." >=20=20 > (define (latest-release package) > "Return an for the latest release of PACKAGE." > - (and-let* ((opam-name (guix-package->opam-name package)) > - (opam-file (opam-fetch opam-name)) > - (version (assoc-ref opam-file "version")) > - (opam-content (assoc-ref opam-file "metadata")) > - (url-dict (metadata-ref opam-content "url")) > - (source-url (metadata-ref url-dict "src"))) > - (upstream-source > - (package (package-name package)) > - (version version) > - (urls (list source-url))))) > + (catch #t Using (catch #t ...) is generally not a good idea. Maybe =E2=80=98opam-fet= ch=E2=80=99 should raise a =E2=80=98opam-fetch=E2=80=99 condition, and then we would only catc= h those conditions? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmFhY0sVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x556cP/2YgvaXx7HRVhnHBGhlST4urdQNM x4qcJn5KPXUF+S2UFjwRrRspaLLLvIZcyM2wyeoWBtqkeWC5QaJyZdnYXM1iKrEz Dt9Y3GJ31RmPkn0Ssv2B+Qq+AhHp3t0KjEmBaheqdT8PE9Pnr9FQCdpLicMEd3Gf 7F6+k06cLjZZqDABofq+NWFA359XLFZyEEBkRyanqIvcRFFAJ68VZlToqPbK9U2F hnkPuFyea3ki4LrdqN61sy512aapkCQ2pmBeWe1Mxkk7itCXmVevj4LzlgzwEjvn 0NiWz3XrEJLWBKosYl53vR8fvBw5iWHn87mbAzVSey8028ACXalZWvgdWajeVL45 9KzPdmD3jzI+Ba2h/IOIidhGphBUTnGz1w6OlpchGpE3pTK692xgpSDebX1DFBq1 MCxsizihpikJ2vBfMt5UzHXjOBpazebqsvrM5UElfL1IWLO76BG3DOaKVCa9TWus YwbVK8CjpzawFv6KVwohWF37Efw1rdGOdD0vD0r2UtdYC4/ho5Hpm9uvVbUgDZSU G2qwwntBi6jHWKjAebZbL12rCP3S37iUiPCsCGiwQ4XePNG71ksHJ/TI+pw7Jzlf CW5SYxSn2dmA/TghbuEBCcYdsXdqOkM97lu6cBxLjZ4jAkfZDCx6Nvl2FS8dcZjT L0FLfozTXLK1/VOp =M5U1 -----END PGP SIGNATURE----- --=-=-=--