GNU logs - #70227, boring messages


Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#70227] [PATCH 0/2] Improving composer import.
Resent-From: Nicolas Graves <ngraves@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Sat, 06 Apr 2024 02:05:01 +0000
Resent-Message-ID: <handler.70227.B.171236908429744 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 70227
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 70227 <at> debbugs.gnu.org
Cc: ngraves@HIDDEN
X-Debbugs-Original-To: guix-patches@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.171236908429744
          (code B ref -1); Sat, 06 Apr 2024 02:05:01 +0000
Received: (at submit) by debbugs.gnu.org; 6 Apr 2024 02:04:44 +0000
Received: from localhost ([127.0.0.1]:37874 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rsvQC-0007jg-Jy
	for submit <at> debbugs.gnu.org; Fri, 05 Apr 2024 22:04:44 -0400
Received: from lists.gnu.org ([2001:470:142::17]:60606)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1rsvQ7-0007il-Fu
 for submit <at> debbugs.gnu.org; Fri, 05 Apr 2024 22:04:43 -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 <ngraves@HIDDEN>)
 id 1rsvPv-0001SA-RA
 for guix-patches@HIDDEN; Fri, 05 Apr 2024 22:04:27 -0400
Received: from 4.mo550.mail-out.ovh.net ([46.105.76.26])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ngraves@HIDDEN>)
 id 1rsvPt-0005Ru-92
 for guix-patches@HIDDEN; Fri, 05 Apr 2024 22:04:27 -0400
Received: from director2.ghost.mail-out.ovh.net (unknown [10.109.176.101])
 by mo550.mail-out.ovh.net (Postfix) with ESMTP id 4VBJZD6c1yz1BBF
 for <guix-patches@HIDDEN>; Sat,  6 Apr 2024 02:04:20 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-cpk2g (unknown [10.111.182.166])
 by director2.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 95C541FD0F;
 Sat,  6 Apr 2024 02:04:20 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.106])
 by ghost-submission-6684bf9d7b-cpk2g with ESMTPSA
 id 1yY7HKStEGYRJwQAMM2uZg
 (envelope-from <ngraves@HIDDEN>); Sat, 06 Apr 2024 02:04:20 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-106R0067e2b7e93-1152-45b5-82c7-638e653213c9,
 864EC9CA9318039CF6D4BAE14C4DDD6D93296F2D) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 90.110.172.34
From: Nicolas Graves <ngraves@HIDDEN>
Date: Sat,  6 Apr 2024 04:04:15 +0200
Message-ID: <20240406020415.9360-1-ngraves@HIDDEN>
X-Mailer: git-send-email 2.41.0
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 12512125664780804834
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledrudeguddgheegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepkeffgeetfffgffejgeejvdffgfdtvdeuueetgfefuedvjeegvdegjeejveeuueevnecukfhppeduvdejrddtrddtrddupdeltddruddutddrudejvddrfeegpdefjedrheelrddugedvrddutdeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopehguhhigidqphgrthgthhgvshesghhnuhdrohhrghdpoffvtefjohhsthepmhhoheehtddpmhhouggvpehsmhhtphhouhht
Received-SPF: pass client-ip=46.105.76.26; envelope-from=ngraves@HIDDEN;
 helo=4.mo550.mail-out.ovh.net
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 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_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
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 (/)

This patch series superseeds former patches 67895, 67897 and 67906.
It fixes bugs, handles parsing failures and implements recursive package refresh.

Nicolas Graves (2):
  guix: import: composer: Handle parsing failures.
  guix: import: composer: Implement recursive package refresh.

 guix/import/composer.scm | 41 +++++++++++++++++++++++++++++-----------
 1 file changed, 30 insertions(+), 11 deletions(-)

-- 
2.41.0





Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Nicolas Graves <ngraves@HIDDEN>
Subject: bug#70227: Acknowledgement ([PATCH 0/2] Improving composer import.)
Message-ID: <handler.70227.B.171236908429744.ack <at> debbugs.gnu.org>
References: <20240406020415.9360-1-ngraves@HIDDEN>
X-Gnu-PR-Message: ack 70227
X-Gnu-PR-Package: guix-patches
X-Gnu-PR-Keywords: patch
Reply-To: 70227 <at> debbugs.gnu.org
Date: Sat, 06 Apr 2024 02:05:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 guix-patches@HIDDEN

If you wish to submit further information on this problem, please
send it to 70227 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
70227: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D70227
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#70227] [PATCH 1/2] guix: import: composer: Handle parsing failures.
References: <20240406020415.9360-1-ngraves@HIDDEN>
In-Reply-To: <20240406020415.9360-1-ngraves@HIDDEN>
Resent-From: Nicolas Graves <ngraves@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Sat, 06 Apr 2024 02:10:01 +0000
Resent-Message-ID: <handler.70227.B70227.171236935131086 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 70227
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 70227 <at> debbugs.gnu.org
Cc: ngraves@HIDDEN
Received: via spool by 70227-submit <at> debbugs.gnu.org id=B70227.171236935131086
          (code B ref 70227); Sat, 06 Apr 2024 02:10:01 +0000
Received: (at 70227) by debbugs.gnu.org; 6 Apr 2024 02:09:11 +0000
Received: from localhost ([127.0.0.1]:37880 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rsvUV-00085E-91
	for submit <at> debbugs.gnu.org; Fri, 05 Apr 2024 22:09:11 -0400
Received: from 6.mo561.mail-out.ovh.net ([188.165.43.173]:50387)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1rsvUS-00084z-Di
 for 70227 <at> debbugs.gnu.org; Fri, 05 Apr 2024 22:09:10 -0400
Received: from director9.ghost.mail-out.ovh.net (unknown [10.109.148.65])
 by mo561.mail-out.ovh.net (Postfix) with ESMTP id 4VBJgc6YK9z1LDx
 for <70227 <at> debbugs.gnu.org>; Sat,  6 Apr 2024 02:09:00 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-dmdhw (unknown [10.110.178.161])
 by director9.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 97E611FD5D;
 Sat,  6 Apr 2024 02:09:00 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.109])
 by ghost-submission-6684bf9d7b-dmdhw with ESMTPSA
 id WweFIbyuEGYRYA0AUrkRxw
 (envelope-from <ngraves@HIDDEN>); Sat, 06 Apr 2024 02:09:00 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-109S00371c7ceb8-b3a7-4d0e-9a85-c90810f78b1e,
 864EC9CA9318039CF6D4BAE14C4DDD6D93296F2D) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 90.110.172.34
From: Nicolas Graves <ngraves@HIDDEN>
Date: Sat,  6 Apr 2024 04:08:50 +0200
Message-ID: <20240406020852.15996-1-ngraves@HIDDEN>
X-Mailer: git-send-email 2.41.0
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 12590938660711686882
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledrudeguddgheehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepkeffgeetfffgffejgeejvdffgfdtvdeuueetgfefuedvjeegvdegjeejveeuueevnecukfhppeduvdejrddtrddtrddupdeltddruddutddrudejvddrfeegpdefjedrheelrddugedvrddutdelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeejtddvvdejseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehiedupdhmohguvgepshhmthhpohhuth
X-Spam-Score: -0.0 (/)
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: -1.0 (-)

* guix/import/composer (latest-release): Handle parsing
failures. Rename package to composer-package for clarity.

Change-Id: I57f6fba7b05122b031177681e76cf0b5c9547736
---
 guix/import/composer.scm | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/guix/import/composer.scm b/guix/import/composer.scm
index 1ad608964b..75419ca63e 100644
--- a/guix/import/composer.scm
+++ b/guix/import/composer.scm
@@ -243,16 +243,19 @@ (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))
-         (version (composer-package-version package))
-         (url (composer-source-url (composer-package-source package))))
-    (upstream-source
-     (package (package-name package))
-     (version version)
-     (urls (list url)))))
+         (composer-package (composer-fetch php-name #:version version)))
+    (if composer-package
+        (upstream-source
+         (package (composer-package-name composer-package))
+         (version (composer-package-version composer-package))
+         (urls (list (composer-source-url
+                      (composer-package-source composer-package)))))
+        (begin
+          (warning (G_ "failed to parse ~a~%") php-name)
+          #f))))
 
 (define %composer-updater
   (upstream-updater
-- 
2.41.0





Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#70227] [PATCH 2/2] guix: import: composer: Implement recursive package refresh.
Resent-From: Nicolas Graves <ngraves@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Sat, 06 Apr 2024 02:10:02 +0000
Resent-Message-ID: <handler.70227.B70227.171236935431095 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 70227
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 70227 <at> debbugs.gnu.org
Cc: ngraves@HIDDEN
Received: via spool by 70227-submit <at> debbugs.gnu.org id=B70227.171236935431095
          (code B ref 70227); Sat, 06 Apr 2024 02:10:02 +0000
Received: (at 70227) by debbugs.gnu.org; 6 Apr 2024 02:09:14 +0000
Received: from localhost ([127.0.0.1]:37882 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rsvUX-00085S-Qb
	for submit <at> debbugs.gnu.org; Fri, 05 Apr 2024 22:09:14 -0400
Received: from 7.mo561.mail-out.ovh.net ([46.105.57.200]:36971)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ngraves@HIDDEN>) id 1rsvUU-000856-He
 for 70227 <at> debbugs.gnu.org; Fri, 05 Apr 2024 22:09:11 -0400
Received: from director3.ghost.mail-out.ovh.net (unknown [10.109.139.217])
 by mo561.mail-out.ovh.net (Postfix) with ESMTP id 4VBJgg1Q3Zz1Mfl
 for <70227 <at> debbugs.gnu.org>; Sat,  6 Apr 2024 02:09:03 +0000 (UTC)
Received: from ghost-submission-6684bf9d7b-p9bpr (unknown [10.110.168.159])
 by director3.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 053541FD43;
 Sat,  6 Apr 2024 02:09:02 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.102])
 by ghost-submission-6684bf9d7b-p9bpr with ESMTPSA
 id dnUFOr6uEGYDrQIADCYBAg
 (envelope-from <ngraves@HIDDEN>); Sat, 06 Apr 2024 02:09:02 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-102R00462e35e1e-cec0-4859-8cdd-c3807333bc31,
 864EC9CA9318039CF6D4BAE14C4DDD6D93296F2D) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 90.110.172.34
From: Nicolas Graves <ngraves@HIDDEN>
Date: Sat,  6 Apr 2024 04:08:51 +0200
Message-ID: <20240406020852.15996-2-ngraves@HIDDEN>
X-Mailer: git-send-email 2.41.0
In-Reply-To: <20240406020852.15996-1-ngraves@HIDDEN>
References: <20240406020852.15996-1-ngraves@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 12591783085524509410
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledrudeguddgheehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdeltddruddutddrudejvddrfeegpdefjedrheelrddugedvrddutddvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeejtddvvdejseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehiedupdhmohguvgepshhmthhpohhuth
X-Spam-Score: -0.0 (/)
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: -1.0 (-)

* guix/import/composer.scm
 (composer-fetch): Replace reduce by fold to correct version selection
 logic.
 (latest-release): Implement recursive package refresh. Rename to
 import-release.
 (import-release): New function, formerly known as latest-release.

Change-Id: I8f629b4d1da866f5986d39b4e159f2b44af9ee49
---
 guix/import/composer.scm | 34 +++++++++++++++++++++++++---------
 1 file changed, 25 insertions(+), 9 deletions(-)

diff --git a/guix/import/composer.scm b/guix/import/composer.scm
index 75419ca63e..e2a60969aa 100644
--- a/guix/import/composer.scm
+++ b/guix/import/composer.scm
@@ -113,7 +113,7 @@ (define* (composer-fetch name #:key (version #f))
          (if version
              (assoc-ref packages version)
              (cdr
-              (reduce
+              (fold
                (lambda (new cur-max)
                  (match new
                    (((? valid-version? version) . tail)
@@ -243,16 +243,32 @@ (define (php-package? package)
    (eq? (package-build-system package) composer-build-system)
    (string-prefix? "php-" (package-name package))))
 
-(define* (latest-release package #:key (version #f))
-  "Return an <upstream-source> for the latest release of PACKAGE."
+(define* (import-release package #:key (version #f))
+  "Return an <upstream-source> for VERSION or the latest release of PACKAGE."
   (let* ((php-name (guix-package->composer-name package))
          (composer-package (composer-fetch php-name #:version version)))
     (if composer-package
-        (upstream-source
-         (package (composer-package-name composer-package))
-         (version (composer-package-version composer-package))
-         (urls (list (composer-source-url
-                      (composer-package-source composer-package)))))
+        (let* ((guix-name (composer-package-name composer-package))
+               (inputs
+                (append
+                 (map (lambda (dep)
+                        (upstream-input
+                         (name php-name)
+                         (downstream-name guix-name)
+                         (type 'regular)))
+                      (composer-package-require composer-package))
+                 (map (lambda (dep)
+                        (upstream-input
+                         (name php-name)
+                         (downstream-name guix-name)
+                         (type 'native)))
+                      (composer-package-dev-require composer-package)))))
+          (upstream-source
+           (package guix-name)
+           (version (composer-package-version composer-package))
+           (urls (list (composer-source-url
+                        (composer-package-source composer-package))))
+           (inputs inputs)))
         (begin
           (warning (G_ "failed to parse ~a~%") php-name)
           #f))))
@@ -262,7 +278,7 @@ (define %composer-updater
    (name 'composer)
    (description "Updater for Composer packages")
    (pred php-package?)
-   (import latest-release)))
+   (import import-release)))
 
 (define* (composer-recursive-import package-name #:optional version)
   (recursive-import package-name
-- 
2.41.0





Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#70227] [PATCH 2/2] guix: import: composer: Implement recursive package refresh.
Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Mon, 29 Apr 2024 21:31:02 +0000
Resent-Message-ID: <handler.70227.B70227.171442621813345 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 70227
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: Nicolas Graves <ngraves@HIDDEN>
Cc: 70227 <at> debbugs.gnu.org
Received: via spool by 70227-submit <at> debbugs.gnu.org id=B70227.171442621813345
          (code B ref 70227); Mon, 29 Apr 2024 21:31:02 +0000
Received: (at 70227) by debbugs.gnu.org; 29 Apr 2024 21:30:18 +0000
Received: from localhost ([127.0.0.1]:58825 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s1YZl-0003TA-W0
	for submit <at> debbugs.gnu.org; Mon, 29 Apr 2024 17:30:18 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:50170)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1s1YZi-0003T0-Gz
 for 70227 <at> debbugs.gnu.org; Mon, 29 Apr 2024 17:30:16 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1s1YZH-0002mq-Bp; Mon, 29 Apr 2024 17:29:47 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To:
 From; bh=YrABkmJyjx/v5bMOef0TQQEg7Di2/c5CGFCuPXm9L2c=; b=H1r0LiKezLyn61UIi7Px
 p5iA7rn1ldR8QcBH+74oSpxeICVRKQlWR0H3VrKcpmdwhjyfYzwiKFlyxGER3/IG+XZWchf669Aax
 INEvUDBXcQp1noreu17h9CJUcozfflI7x5aowGhhVeRBEY6rma1FgM8Wnm99xWZ6tScg8N7aUrxoj
 Spc9kf0Pes1ukP2N1zoisofz5iO66iJ6qQkQxj49+WvHTxJPpwYmeroGa22YcWjzzD9+Z5AX17oTP
 hdvqGJZQZWVOtvvu6HXud0HSf7l1Q28bgT6DUlUBu47WKQZ1nSheRC0qhiiKqNPxI4Izr5HV216Xu
 WRptUaNfSvQcvw==;
From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
In-Reply-To: <20240406020852.15996-2-ngraves@HIDDEN> (Nicolas Graves's
 message of "Sat, 6 Apr 2024 04:08:51 +0200")
References: <20240406020852.15996-1-ngraves@HIDDEN>
 <20240406020852.15996-2-ngraves@HIDDEN>
Date: Mon, 29 Apr 2024 23:29:44 +0200
Message-ID: <87wmofzwl3.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
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: -3.3 (---)

Hi!

Nicolas Graves <ngraves@HIDDEN> skribis:

> * guix/import/composer.scm
>  (composer-fetch): Replace reduce by fold to correct version selection
>  logic.
>  (latest-release): Implement recursive package refresh. Rename to
>  import-release.
>  (import-release): New function, formerly known as latest-release.

Nice, glad to see this feature put to good use.  :-)


[...]

> +(define* (import-release package #:key (version #f))
> +  "Return an <upstream-source> for VERSION or the latest release of PACK=
AGE."
>    (let* ((php-name (guix-package->composer-name package))
>           (composer-package (composer-fetch php-name #:version version)))
>      (if composer-package
> -        (upstream-source
> -         (package (composer-package-name composer-package))
> -         (version (composer-package-version composer-package))
> -         (urls (list (composer-source-url
> -                      (composer-package-source composer-package)))))
> +        (let* ((guix-name (composer-package-name composer-package))
> +               (inputs
> +                (append
> +                 (map (lambda (dep)
> +                        (upstream-input
> +                         (name php-name)
> +                         (downstream-name guix-name)
> +                         (type 'regular)))
> +                      (composer-package-require composer-package))
> +                 (map (lambda (dep)
> +                        (upstream-input
> +                         (name php-name)
> +                         (downstream-name guix-name)
> +                         (type 'native)))

Shouldn=E2=80=99t it be:

  (upstream-input
    (name dep)
    (downstream-name (php-package-name dep))
    (type =E2=80=A6))

?

As a slight improvement, since the =E2=80=98inputs=E2=80=99 field of <upstr=
eam-source>
is delayed (wrapped in a promise, so that its computation only happens
when it=E2=80=99s needed), you could arrange to replace the =E2=80=98inputs=
=E2=80=99 variable
above like so:

  (define (dependency->input dependency type)
    (upstream-input =E2=80=A6))

  (upstream-source
    ;; =E2=80=A6
    (inputs (append (map (cut dependency->input <> 'regular) =E2=80=A6)
                    (map (cut dependency->input <> 'native) =E2=80=A6))))

I hope this makes sense.

Thanks!

Ludo=E2=80=99.




Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#70227] [PATCH 0/2] Improving composer import.
References: <20240406020415.9360-1-ngraves@HIDDEN>
Resent-From: jgart <jgart@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Sat, 13 Jul 2024 13:42:02 +0000
Resent-Message-ID: <handler.70227.B70227.17208780745257 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 70227
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 70227 <at> debbugs.gnu.org
Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Nicolas Graves <ngraves@HIDDEN>
Received: via spool by 70227-submit <at> debbugs.gnu.org id=B70227.17208780745257
          (code B ref 70227); Sat, 13 Jul 2024 13:42:02 +0000
Received: (at 70227) by debbugs.gnu.org; 13 Jul 2024 13:41:14 +0000
Received: from localhost ([127.0.0.1]:55321 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sSczy-0001Mj-99
	for submit <at> debbugs.gnu.org; Sat, 13 Jul 2024 09:41:14 -0400
Received: from mx2.dismail.de ([159.69.191.136]:20275)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jgart@HIDDEN>) id 1sSczw-0001MU-8z
 for 70227 <at> debbugs.gnu.org; Sat, 13 Jul 2024 09:41:13 -0400
Received: from mx2.dismail.de (localhost [127.0.0.1])
 by mx2.dismail.de (OpenSMTPD) with ESMTP id c4caae5e;
 Sat, 13 Jul 2024 15:41:05 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h=from:to:cc
 :subject:in-reply-to:date:message-id:mime-version:content-type;
 s=20190914; bh=So9qDRXcJIv/h9lm2yLK3ytZmr12MSNTtWLjrdB3yKU=; b=
 F0OsA/EF1n89kx2HrPDomgTqiu2naQ6WkTj3XXHXYfGDM/lbd5/d6OqtgrefwWiO
 V2BJKV8y+zXsvRo3RGXsSztrq//ohIeFKeyAKWRQKdamXtuZZJD1w+5EgeqNKsQU
 NXBMleyUz7rkt7NMtyO4CH24eLcImHMoVI7zbRp4f5BtYZs8RYboQKC4s/T/OGT8
 D+9qtXMuI0INzdipN02lSCE6i2UzV42IkF4aYa5XckGTW2s7kheNHhSQfvCOJsBB
 4jLKLeZ4ydUBA2zXItkzr2FCcR+9/xv27TpEpAYRTT6oRIbJDoTLV6kTJaqAQlgc
 9mLnInfRP2R9UrJJOkNxqQ==
Received: from smtp1.dismail.de (<unknown> [10.240.26.11])
 by mx2.dismail.de (OpenSMTPD) with ESMTP id b69bbede;
 Sat, 13 Jul 2024 15:41:05 +0200 (CEST)
Received: from smtp1.dismail.de (localhost [127.0.0.1])
 by smtp1.dismail.de (OpenSMTPD) with ESMTP id 1f3b6460;
 Sat, 13 Jul 2024 15:41:05 +0200 (CEST)
Received: by dismail.de (OpenSMTPD) with ESMTPSA id 10e8ebd0
 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); 
 Sat, 13 Jul 2024 15:41:04 +0200 (CEST)
From: jgart <jgart@HIDDEN>
In-Reply-To: <87wmofzwl3.fsf@HIDDEN>
Date: Sat, 13 Jul 2024 08:41:02 -0500
Message-ID: <87le25e7f5.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
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: -3.3 (---)


Hi Nicolas,

Are you still working on this ticket?

Feel free to send a v2 if you find the time with ludo's suggestions.
-- 
all the best,
jgart




Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#70227] [PATCH 0/2] Improving composer import.
Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Thu, 18 Jul 2024 09:22:02 +0000
Resent-Message-ID: <handler.70227.B70227.172129449327479 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 70227
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: jgart <jgart@HIDDEN>
Cc: Nicolas Graves <ngraves@HIDDEN>, 70227 <at> debbugs.gnu.org
Received: via spool by 70227-submit <at> debbugs.gnu.org id=B70227.172129449327479
          (code B ref 70227); Thu, 18 Jul 2024 09:22:02 +0000
Received: (at 70227) by debbugs.gnu.org; 18 Jul 2024 09:21:33 +0000
Received: from localhost ([127.0.0.1]:36916 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sUNKP-000799-1r
	for submit <at> debbugs.gnu.org; Thu, 18 Jul 2024 05:21:33 -0400
Received: from eggs.gnu.org ([209.51.188.92]:47058)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1sUNKN-00078u-46
 for 70227 <at> debbugs.gnu.org; Thu, 18 Jul 2024 05:21:31 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1sUNK9-0008RE-Rc; Thu, 18 Jul 2024 05:21:19 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To:
 From; bh=RzlWJZBI+3Sh6+FGXMVZIhXkD+pgXEcmpkr0BWILmNI=; b=lRLHIL4gWLiGhaxc+y5d
 1e5guvw5/kqW1mzs6GQ00nOAZqS/kwRPqaysHB0jT7K+jRIDd/pNuidxeM9YIlM4f9jtfvAOuaAp9
 ryUI+oWPW1rl6A73vsWZRagvHk6a9NetXX8KYwkXVz3W/e/8NxcaUK/yjfOqRmiLPrdjLRfRQJIBK
 V+3zJduVQt01OuEKZjDWmJCZha4015QEFlzabaiqd9kI/5ixOMIOwBBvTTrSlb13Vdfu3OGmeVEVD
 aJIRrw//0WILI1FNCjkOFj7MRidAys4gKYn2E4wxDA77ZDghytep+SkJqi8eKlSZa9uwj7wWN6hlk
 /FaT48JoGi2z/A==;
From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
In-Reply-To: <87le25e7f5.fsf@HIDDEN> (jgart@HIDDEN's message of "Sat, 
 13 Jul 2024 08:41:02 -0500")
References: <87le25e7f5.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Primidi 1 Thermidor an 232 de la =?UTF-8?Q?R=C3=A9volution,?= jour de =?UTF-8?Q?l'=C3=89pautre?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Thu, 18 Jul 2024 11:21:14 +0200
Message-ID: <87v813vywl.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
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: -3.3 (---)

Hello,

jgart <jgart@HIDDEN> skribis:

> Feel free to send a v2 if you find the time with ludo's suggestions.

Oh yes, we were close to the finish line!

(Thanks jgart for following up on these forgotten issues; much
appreciated.)

Ludo=E2=80=99.





Last modified: Thu, 18 Jul 2024 09:30:02 UTC

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