From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id kCDLKZ1PD2d+XQEAqHPOHw:P1 (envelope-from ) for ; Wed, 16 Oct 2024 05:31:09 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id kCDLKZ1PD2d+XQEAqHPOHw (envelope-from ) for ; Wed, 16 Oct 2024 07:31:09 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=bBEOwQJF; dkim=fail ("headers rsa verify failed") header.d=ngraves.fr header.s=ovhmo4487190-selector1 header.b=tBDymzZt; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1729056669; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=dNCYeQ0XhyQ4PycbZWmYec5TmChI3NfXPBQ1fYdbaKs=; b=fbP4Bm4hJUBLVGpb+u6+HR7XVQftoleLxGeUD6A3vfJhaIcYXH8zFW05jw7Nc2p42u8gXM Fz7/MdG8kc/BqUfI5z2vEaSXAA0C4UAEnfYybzeqyh6mHNW+3LhqE4snKZRxSEBa6owPCc C75+4f92m0l5Qldw0WYsl1drpggeDTGDZG8mIDWsITDnxkBUH9OI43srQ5pLGvOIUeEJ6Z K6lw5YN8AXzz1FnQS4spTbvr1an+KGo+HuiVvgjmiDmt7uEc4SEdifUaC/5mS7AsiodqOV WW5r5BxgpuFHaztkzelIZyVU4s0ESkHIUukcSiUcX9jiR4cCb/sU9nrKXvYtTw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=bBEOwQJF; dkim=fail ("headers rsa verify failed") header.d=ngraves.fr header.s=ovhmo4487190-selector1 header.b=tBDymzZt; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1729056669; a=rsa-sha256; cv=none; b=V6yB8tJNPZUgpjVydu3hXBCHT7IvjeJZ1VzohcALrKHEW8eJpicWLIEXH0oGYhBEM80htX 6E/ULD+57YkASe0gS3u0j5FWxvid2ECjbyFo0Hdz6sE7RXhAHe8sy2XKewiNSwDTCOIiEV 7+g+JOGZzJMYDDATaBOGmaKPlP5UJmhPisEwo3hioELXQ3+vQgEAM8dF3GL+uUMeAcLuvM /2oQV9x0/V8vr1qWVagDkLf36fis/t+dgSYsig3GVT7A5OjPLWYFMwmxMmMQQCx2canUnX nUxwgUI76iVE4rDr8poF4An4oMyQprknevbFF2fCXdolJtuI4qEff1NrHsUkcw== 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 298C77B3FE for ; Wed, 16 Oct 2024 07:31:08 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t0wcQ-0007dv-UL; Wed, 16 Oct 2024 01:30:47 -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 1t0wcO-0007dR-J9 for guix-patches@gnu.org; Wed, 16 Oct 2024 01:30:44 -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 1t0wcO-0001lG-5m for guix-patches@gnu.org; Wed, 16 Oct 2024 01:30:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=dNCYeQ0XhyQ4PycbZWmYec5TmChI3NfXPBQ1fYdbaKs=; b=bBEOwQJF0AP0vZGeMg37gfNlX4Mg2Bzo/PVBJjTsQUO93DwZQbNUWFUOYmqXHZZdpcdLTjqiqcoZCiliL52q/ZjsmMv9SgB4XTU7gRIGSCa/ItAYK8YVAjXwpAdp47jG8UxFE9IeH6Z+CJEKygHHNawfvzHkJWNc8nIZ2z9Y7cUIdl5Ic8LkdiSrYn41ihpUWBr71qKs5Va7qxWaJKwO3GW2QMI0UiVHy+V2Lqak9vfGI/fag4FTbr/L2zaq9aX4aZgMPWeoopsW1B+hkul23EQXhsEq3RYyy3EMj0Jje/55BMy9nQ0dHKvuchPJXP+TvhBjSvOskjaeqrUeOQQgpQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t0wcg-0003xf-Nb for guix-patches@gnu.org; Wed, 16 Oct 2024 01:31:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73833] [PATCH] guix: import: composer: Improve composer-fetch. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 16 Oct 2024 05:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73833 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73833@debbugs.gnu.org Cc: Nicolas Graves X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.172905664115165 (code B ref -1); Wed, 16 Oct 2024 05:31:02 +0000 Received: (at submit) by debbugs.gnu.org; 16 Oct 2024 05:30:41 +0000 Received: from localhost ([127.0.0.1]:58215 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t0wcK-0003wX-QH for submit@debbugs.gnu.org; Wed, 16 Oct 2024 01:30:41 -0400 Received: from lists.gnu.org ([209.51.188.17]:54778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t0wcH-0003wJ-Un for submit@debbugs.gnu.org; Wed, 16 Oct 2024 01:30:39 -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 1t0wbu-0007c7-9f for guix-patches@gnu.org; Wed, 16 Oct 2024 01:30:15 -0400 Received: from 5.mo560.mail-out.ovh.net ([87.98.181.248]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t0wbp-0001Oq-J4 for guix-patches@gnu.org; Wed, 16 Oct 2024 01:30:13 -0400 Received: from director1.ghost.mail-out.ovh.net (unknown [10.108.25.23]) by mo560.mail-out.ovh.net (Postfix) with ESMTP id 4XT00Q2mjSz1TRr for ; Wed, 16 Oct 2024 05:29:58 +0000 (UTC) Received: from ghost-submission-55b549bf7b-xsbvw (unknown [10.111.174.60]) by director1.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 6DF841FE03; Wed, 16 Oct 2024 05:29:56 +0000 (UTC) Received: from ngraves.fr ([37.59.142.98]) by ghost-submission-55b549bf7b-xsbvw with ESMTPSA id twRHLVRPD2f2KgAAbjPiVg (envelope-from ); Wed, 16 Oct 2024 05:29:56 +0000 X-OVh-ClientIp: 89.207.171.135 Date: Wed, 16 Oct 2024 07:29:49 +0200 Message-ID: <20241016052953.16069-1-ngraves@ngraves.fr> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 5716756779975631586 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeeftddrvdegkedgleejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepkeffgeetfffgffejgeejvdffgfdtvdeuueetgfefuedvjeegvdegjeejveeuueevnecukfhppeduvdejrddtrddtrddupdekledrvddtjedrudejuddrudefhedpfeejrdehledrudegvddrleeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopehguhhigidqphgrthgthhgvshesghhnuhdrohhrghdpoffvtefjohhsthepmhhoheeitddpmhhouggvpehsmhhtphhouhht DKIM-Signature: a=rsa-sha256; bh=dNCYeQ0XhyQ4PycbZWmYec5TmChI3NfXPBQ1fYdbaKs=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1729056598; v=1; b=tBDymzZtlLN+1c9yewPmXihfpGDgtA+HFnlRIuVbK/dleQF4dEbbpdFc15LgUFOGHh1pRTfu ftD1k1TKJuY4ZFTH+tlJ2BgFsGPo4E2TeASjTp9zSdKei/7riGiduLGm7PbFhu60J60ASukyJQj hVnxDCdx47A88Qj3eEuniQb4p38i6A/eKmnu/oMXKmux5bHq9JTAgzw8SPgrFA5ayQse6Wwd1Z9 2m0X0UsQHfEC/6HN7eHBg57z4dYXUuxKvdVJZzPTQI6hvkWPROvrlci3KFc+4Pju/OP9ZDtS7k4 r6HkiZG0QplNHEsmPTqdCB0MCMZYH+15haBorPkOP1kWw== Received-SPF: pass client-ip=87.98.181.248; envelope-from=ngraves@ngraves.fr; helo=5.mo560.mail-out.ovh.net 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_FILL_THIS_FORM_SHORT=0.01 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: , Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches From: Nicolas Graves via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: 0.48 X-Spam-Score: 0.48 X-Migadu-Queue-Id: 298C77B3FE X-TUID: lkrP/tqOcCpa * guix/import/composer.scm (composer-fetch): Handle a case where packages are #f. This improves composer-fetch behavior, which was sometimes buggy. --- guix/import/composer.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/guix/import/composer.scm b/guix/import/composer.scm index abc9023be4..febde97791 100644 --- a/guix/import/composer.scm +++ b/guix/import/composer.scm @@ -111,7 +111,7 @@ (define* (composer-fetch name #:key (version #f)) (let ((pkgs (assoc-ref pkg "packages"))) (or (assoc-ref pkgs name) pkg)))))) (if packages - (json->composer-package + (and=> (if version (assoc-ref packages version) (cdr @@ -125,7 +125,8 @@ (define* (composer-fetch name #:key (version #f)) cur-max)) (_ cur-max))) (cons* "0.0.0" #f) - packages)))) + packages))) + json->composer-package) #f))) (define (php-package-name name) -- 2.46.0