all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nicolas Graves via Guix-patches via <guix-patches@gnu.org>
To: 73833@debbugs.gnu.org
Cc: Nicolas Graves <ngraves@ngraves.fr>
Subject: [bug#73833] [PATCH] guix: import: composer: Improve composer-fetch.
Date: Wed, 16 Oct 2024 07:29:49 +0200	[thread overview]
Message-ID: <20241016052953.16069-1-ngraves@ngraves.fr> (raw)

* 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





             reply	other threads:[~2024-10-16  5:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-16  5:29 Nicolas Graves via Guix-patches via [this message]
2024-10-17 22:25 ` [bug#73833] [PATCH v2 0/5] Large improvements to import utils, composer import, and refresh Nicolas Graves via Guix-patches via
2024-10-17 22:25   ` [bug#73833] [PATCH v2 1/5] guix: import: utils: Add function git->origin Nicolas Graves via Guix-patches via
2024-10-17 22:25   ` [bug#73833] [PATCH v2 2/5] tests: go: Add mock-git->origin function Nicolas Graves via Guix-patches via
2024-10-17 22:25   ` [bug#73833] [PATCH v2 3/5] guix: import: composer: Improve importer Nicolas Graves via Guix-patches via
2024-10-17 22:26   ` [bug#73833] [PATCH v2 4/5] guix: refresh: Keep the version field of each update specification Nicolas Graves via Guix-patches via
2024-10-17 22:26   ` [bug#73833] [PATCH v2 5/5] guix: refresh: Implement basic upstream-source-inputs rich updates Nicolas Graves via Guix-patches via

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=20241016052953.16069-1-ngraves@ngraves.fr \
    --to=guix-patches@gnu.org \
    --cc=73833@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.