From: "Ludovic Courtès" <ludo@gnu.org>
To: Christopher Baines <mail@cbaines.net>
Cc: 47986@debbugs.gnu.org
Subject: [bug#47986] [PATCH] inferior: Support querying package replacements.
Date: Sat, 15 May 2021 12:11:56 +0200 [thread overview]
Message-ID: <87eee8l30z.fsf_-_@gnu.org> (raw)
In-Reply-To: <20210514084200.5896-1-mail@cbaines.net> (Christopher Baines's message of "Fri, 14 May 2021 09:42:00 +0100")
Hi,
Christopher Baines <mail@cbaines.net> skribis:
> I'm looking at this to help with adding support for looking up package
> replacements to store in the Guix Data Service.
>
> * guix/inferior.scm (inferior-package-replacement): New procedure.
> * tests/inferior.scm ("inferior-package-replacement"): New test.
[...]
> +(test-equal "inferior-package-replacement"
> + (package-derivation %store
> + (or (package-replacement sqlite) sqlite)
> + "x86_64-linux")
> + (let* ((inferior (open-inferior %top-builddir
> + #:command "scripts/guix"))
> + (packages (inferior-packages inferior)))
> + (match (lookup-inferior-packages inferior
> + (package-name sqlite)
> + (package-version sqlite))
> + ((inferior-sqlite rest ...)
> + (inferior-package-derivation %store
> + (or (inferior-package-replacement
> + inferior-sqlite)
> + inferior-sqlite)
> + "x86_64-linux")))))
Problem is that this test assumes sqlite has a replacement. Maybe
precede it:
(unless (package-replacement sqlite)
(test-skip 1))
and remove (or (package-replacement …) …) and similar.
That way we’ll notice when the test is skipped.
Otherwise LGTM, thanks!
Ludo’.
next prev parent reply other threads:[~2021-05-15 10:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-24 5:45 [bug#47986] [PATCH] inferior: Support querying package replacements Christopher Baines
2021-05-03 20:50 ` Ludovic Courtès
2021-05-14 8:45 ` Christopher Baines
2021-05-14 8:42 ` [bug#47986] [PATCH v2] " Christopher Baines
2021-05-15 10:11 ` Ludovic Courtès [this message]
2021-05-15 11:15 ` bug#47986: [PATCH] " Christopher Baines
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eee8l30z.fsf_-_@gnu.org \
--to=ludo@gnu.org \
--cc=47986@debbugs.gnu.org \
--cc=mail@cbaines.net \
/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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).