From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id WMcSFEC1X2G6HQAAgWs5BA (envelope-from ) for ; Fri, 08 Oct 2021 05:04:32 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 4KS2D0C1X2GCXQAAbx9fmQ (envelope-from ) for ; Fri, 08 Oct 2021 03:04:32 +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 D6A6D10A86 for ; Fri, 8 Oct 2021 05:04:31 +0200 (CEST) Received: from localhost ([::1]:58742 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYgBT-0008Fx-0X for larch@yhetil.org; Thu, 07 Oct 2021 23:04:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42472) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYgB0-0008Fa-Mr for guix-patches@gnu.org; Thu, 07 Oct 2021 23:04:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37291) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYgB0-0006pU-F0 for guix-patches@gnu.org; Thu, 07 Oct 2021 23:04:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mYgB0-0008Vd-4v for guix-patches@gnu.org; Thu, 07 Oct 2021 23:04:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51091] [PATCH] guix: opam: Do not fail when refreshing. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 08 Oct 2021 03:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51091 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51091@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163366221032667 (code B ref -1); Fri, 08 Oct 2021 03:04:01 +0000 Received: (at submit) by debbugs.gnu.org; 8 Oct 2021 03:03:30 +0000 Received: from localhost ([127.0.0.1]:48837 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYgAU-0008Up-0q for submit@debbugs.gnu.org; Thu, 07 Oct 2021 23:03:30 -0400 Received: from lists.gnu.org ([209.51.188.17]:33918) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYgAR-0008Uh-Cn for submit@debbugs.gnu.org; Thu, 07 Oct 2021 23:03:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42274) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYgAR-0008E1-75 for guix-patches@gnu.org; Thu, 07 Oct 2021 23:03:27 -0400 Received: from lepiller.eu ([2a00:5884:8208::1]:51800) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYgAP-0006CR-71 for guix-patches@gnu.org; Thu, 07 Oct 2021 23:03:27 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id db01a4e0 for ; Fri, 8 Oct 2021 03:03:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:subject:message-id:mime-version:content-type; s=dkim; bh=yI9 fZGZhjczlkOFc6NsEYs/GjssuS0LYfAAHwV4JA9w=; b=cmhcGEOUiVS4wFw0mPg 3OuWUWZeVd6mfOyt1jjtdRhNpQPWz3ERqYh+qhHC1Ra+vfG4U+90Br93280egwBp H+rcpp5aVA4MVrjJrlk/2h2nz4OGcNfECTn4PkLwm2oM4UyVYoCknR/ONxX2PLNu FJYwjOQFHuqCkcLoj7NRhSklJ8ny2XQ/QrAW/UtcW0N9lY46kNrck+Mwv34eouPa vL06L8zEi9G6drMXctRJGotXj50ZlZcgTe64xJ72QvcqkOmmbiWPY8YGk6c3mP0c WZXJJgL525N0PZCVG+0uQbEcoQ39DOPbdyEJ9XSHMTUYCKbVFYPEG7bWwOB3uPHd cvg== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id ba079159 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for ; Fri, 8 Oct 2021 03:03:19 +0000 (UTC) Date: Fri, 8 Oct 2021 05:03:10 +0200 From: Julien Lepiller Message-ID: <20211008050310.407d6b23@tachikoma.lepiller.eu> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/ANWqyJ7tcmsQj3Y9/jwX1+H" Received-SPF: pass client-ip=2a00:5884:8208::1; envelope-from=julien@lepiller.eu; helo=lepiller.eu 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, SPF_HELO_PASS=-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: 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=1633662271; 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=g/YI44g0FbaFs4v1WYsxGgM5a96BlnJBWKbMt7MKBf4=; b=tPF1Czzvs5v/V9iRZLbKp7WrmA+uOA8bscKBqfkd+bp0EUh5UWfh8e2cyr1nNqzlbBMAVr 7LhhxsSJSqReUpJATMRmMdqtFVI5WS5ByoEwElTg5B7lNpD2pJPXvu9nnTpw3Q9STpnedC RNMdFmf/I0Y2pZJABPazknsVgCqCdfs3RxqHvz6FqcOOdozIGbTqr7+6w19K2tVb7XKndu wqYLBHCZYfjpJfMUmHPLR0q5ZgAki4kwyBF8LVfIM6U/hjMaY6sb0Q0mBqaBNeP8Wt31Fl 7wpPuWrdchsVfCLsLsNpMf5cwLaTaSowxNEveCLI9UDy9nYpydzYgnnQSf415Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633662271; a=rsa-sha256; cv=none; b=nTR3Y64FqKh6mi/q4JnAb1PuIcY/7yAeiW5H3pgakW8LI6/yn15Le3ZtgYKQTKuy9+h9QM eNkvAGbGcXPRc52hMB3KOQgJGfCOL3Z+f7vC0GfQria03+0InsKZcBlwC3KqZFW6fx3Bp/ 2IOi8AFoDcm+oN0yvIofGD9SEB7HlXZrCo1/Eykb/g9PDkmV8G949qa7LmcfmpMydq02Jx xVjvr80hBMpHOqIcDQfflXQKZG1I3U8uAObz63OGE+w9Bs4PpoAVFi0i5NAJViQj1wQq16 YB7IY45/v8S4f5w6KTejRNO0tQtTf4Q10Wsnq9mdpAkWRjP6wH3J2mhnT499+A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lepiller.eu header.s=dkim header.b=cmhcGEOU; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (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-Spam-Score: 0.18 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lepiller.eu header.s=dkim header.b=cmhcGEOU; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (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: D6A6D10A86 X-Spam-Score: 0.18 X-Migadu-Scanner: scn0.migadu.com X-TUID: nbMaEFJL8wb0 --MP_/ANWqyJ7tcmsQj3Y9/jwX1+H Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline 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. --MP_/ANWqyJ7tcmsQj3Y9/jwX1+H Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0001-guix-opam-Do-not-fail-when-refreshing.patch >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." (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 + (lambda _ + (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))))) + (const #f))) (define %opam-updater (upstream-updater -- 2.33.0 --MP_/ANWqyJ7tcmsQj3Y9/jwX1+H--