GNU bug report logs - #67897
[PATCH] guix: import: composer: Fix latest-release function.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Nicolas Graves <ngraves@HIDDEN>; Keywords: patch; dated Tue, 19 Dec 2023 10:39:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 19 Dec 2023 10:38:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 19 05:38:34 2023
Received: from localhost ([127.0.0.1]:34485 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rFXUf-0000Er-W5
	for submit <at> debbugs.gnu.org; Tue, 19 Dec 2023 05:38:34 -0500
Received: from lists.gnu.org ([2001:470:142::17]:51730)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1rFXUc-0000EK-CW
 for submit <at> debbugs.gnu.org; Tue, 19 Dec 2023 05:38:31 -0500
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 <ngraves@HIDDEN>)
 id 1rFXUU-0000Wy-JI
 for guix-patches@HIDDEN; Tue, 19 Dec 2023 05:38:22 -0500
Received: from 2.mo582.mail-out.ovh.net ([46.105.76.65])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ngraves@HIDDEN>)
 id 1rFXUN-00013T-1b
 for guix-patches@HIDDEN; Tue, 19 Dec 2023 05:38:21 -0500
Received: from director9.ghost.mail-out.ovh.net (unknown [10.109.148.22])
 by mo582.mail-out.ovh.net (Postfix) with ESMTP id 9C2972BB2E
 for <guix-patches@HIDDEN>; Tue, 19 Dec 2023 10:38:10 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-svfw8 (unknown [10.110.168.23])
 by director9.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 3518F1FE8B;
 Tue, 19 Dec 2023 10:38:10 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.109])
 by ghost-submission-6684bf9d7b-svfw8 with ESMTPSA
 id +c6CCJJygWXofwAA1jTRqg
 (envelope-from <ngraves@HIDDEN>); Tue, 19 Dec 2023 10:38:10 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-109S003e703b300-fe3d-47fc-b586-839f853ba4db,
 0A183DEDD9F7D7733B4F13041BD52F66DC821FED) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 81.67.140.142
From: Nicolas Graves <ngraves@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] guix: import: composer: Fix latest-release function.
Date: Tue, 19 Dec 2023 11:38:02 +0100
Message-ID: <20231219103802.15994-1-ngraves@HIDDEN>
X-Mailer: git-send-email 2.41.0
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 8255661070367843037
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrvddutddgudekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepkeffgeetfffgffejgeejvdffgfdtvdeuueetgfefuedvjeegvdegjeejveeuueevnecukfhppeduvdejrddtrddtrddupdekuddrieejrddugedtrddugedvpdefjedrheelrddugedvrddutdelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopehguhhigidqphgrthgthhgvshesghhnuhdrohhrghdpoffvtefjohhsthepmhhoheekvddpmhhouggvpehsmhhtphhouhht
Received-SPF: pass client-ip=46.105.76.65; envelope-from=ngraves@HIDDEN;
 helo=2.mo582.mail-out.ovh.net
X-Spam_score_int: -11
X-Spam_score: -1.2
X-Spam_bar: -
X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001,
 RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001,
 SPF_SOFTFAIL=0.665, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
Cc: ludo@HIDDEN, ngraves@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

* guix/import/composer.scm (latest-release): Support additional
version argument. Replace package-name by composer-package-name.

Change-Id: Ia55a841c8fe23e2d9c35ce80ab695c325ad8f962
---
 guix/import/composer.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/guix/import/composer.scm b/guix/import/composer.scm
index 1ad608964b..069a950f90 100644
--- a/guix/import/composer.scm
+++ b/guix/import/composer.scm
@@ -243,14 +243,14 @@ (define (php-package? package)
    (eq? (package-build-system package) composer-build-system)
    (string-prefix? "php-" (package-name package))))
 
-(define (latest-release package)
+(define* (latest-release package #:key (version #f))
   "Return an <upstream-source> for the latest release of PACKAGE."
   (let* ((php-name (guix-package->composer-name package))
-         (package (composer-fetch php-name))
+         (package (composer-fetch php-name #:version version))
          (version (composer-package-version package))
          (url (composer-source-url (composer-package-source package))))
     (upstream-source
-     (package (package-name package))
+     (package (composer-package-name package))
      (version version)
      (urls (list url)))))
 
-- 
2.41.0





Acknowledgement sent to Nicolas Graves <ngraves@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#67897; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 20 Jan 2024 12:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.