GNU bug report logs - #47986
[PATCH] inferior: Support querying package replacements.

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Sat, 24 Apr 2021 05:46:02 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 47986 <at> debbugs.gnu.org
Subject: [bug#47986] [PATCH] inferior: Support querying package replacements.
Date: Sat, 15 May 2021 12:11:56 +0200
Hi,

Christopher Baines <mail <at> 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’.




This bug report was last modified 4 years and 9 days ago.

Previous Next


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