From: Nicolas Graves via Guix-patches via <guix-patches@gnu.org>
To: 70227@debbugs.gnu.org
Cc: Nicolas Graves <ngraves@ngraves.fr>
Subject: [bug#70227] [PATCH v2 1/2] guix: import: composer: Handle parsing failures.
Date: Mon, 7 Oct 2024 01:55:59 +0200 [thread overview]
Message-ID: <20241006235605.24248-1-ngraves@ngraves.fr> (raw)
In-Reply-To: <20240406020415.9360-1-ngraves@ngraves.fr>
* 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.46.0
next prev parent reply other threads:[~2024-10-06 23:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-06 2:04 [bug#70227] [PATCH 0/2] Improving composer import Nicolas Graves via Guix-patches via
2024-04-06 2:08 ` [bug#70227] [PATCH 1/2] guix: import: composer: Handle parsing failures Nicolas Graves via Guix-patches via
2024-04-06 2:08 ` [bug#70227] [PATCH 2/2] guix: import: composer: Implement recursive package refresh Nicolas Graves via Guix-patches via
2024-04-29 21:29 ` Ludovic Courtès
2024-07-13 13:41 ` [bug#70227] [PATCH 0/2] Improving composer import jgart via Guix-patches via
2024-07-18 9:21 ` Ludovic Courtès
2024-10-06 23:55 ` Nicolas Graves via Guix-patches via [this message]
2024-10-06 23:56 ` [bug#70227] [PATCH v2 2/2] guix: import: composer: Implement recursive package refresh Nicolas Graves via Guix-patches via
2024-10-12 17:46 ` bug#70227: [PATCH v2 1/2] guix: import: composer: Handle parsing failures Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241006235605.24248-1-ngraves@ngraves.fr \
--to=guix-patches@gnu.org \
--cc=70227@debbugs.gnu.org \
--cc=ngraves@ngraves.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.