From unknown Fri Jun 20 07:09:02 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#47986 <47986@debbugs.gnu.org> To: bug#47986 <47986@debbugs.gnu.org> Subject: Status: [PATCH] inferior: Support querying package replacements. Reply-To: bug#47986 <47986@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:09:02 +0000 retitle 47986 [PATCH] inferior: Support querying package replacements. reassign 47986 guix-patches submitter 47986 Christopher Baines severity 47986 normal tag 47986 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 24 01:45:17 2021 Received: (at submit) by debbugs.gnu.org; 24 Apr 2021 05:45:17 +0000 Received: from localhost ([127.0.0.1]:39304 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1laB6T-00042P-2e for submit@debbugs.gnu.org; Sat, 24 Apr 2021 01:45:17 -0400 Received: from lists.gnu.org ([209.51.188.17]:37120) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1laB6S-00042I-2R for submit@debbugs.gnu.org; Sat, 24 Apr 2021 01:45:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1laB6R-0004Cy-Jb for guix-patches@gnu.org; Sat, 24 Apr 2021 01:45:15 -0400 Received: from mira.cbaines.net ([2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27]:52855) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1laB6P-00077M-Kl for guix-patches@gnu.org; Sat, 24 Apr 2021 01:45:15 -0400 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:8ac0:b4c7:f5c8:7caa]) by mira.cbaines.net (Postfix) with ESMTPSA id BD1D927BC7C for ; Sat, 24 Apr 2021 06:45:09 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 338d572e for ; Sat, 24 Apr 2021 05:45:09 +0000 (UTC) From: Christopher Baines To: guix-patches@gnu.org Subject: [PATCH] inferior: Support querying package replacements. Date: Sat, 24 Apr 2021 06:45:09 +0100 Message-Id: <20210424054509.7740-1-mail@cbaines.net> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27; envelope-from=mail@cbaines.net; helo=mira.cbaines.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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) 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. --- guix/inferior.scm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/guix/inferior.scm b/guix/inferior.scm index eb457f81f9..19607724c0 100644 --- a/guix/inferior.scm +++ b/guix/inferior.scm @@ -90,6 +90,7 @@ inferior-package-native-search-paths inferior-package-transitive-native-search-paths inferior-package-search-paths + inferior-package-replacement inferior-package-provenance inferior-package-derivation @@ -462,6 +463,25 @@ package." (define inferior-package-transitive-native-search-paths (cut %inferior-package-search-paths <> 'package-transitive-native-search-paths)) +(define (inferior-package-replacement package) + (match (inferior-package-field + package + '(compose (match-lambda + ((? package? package) + (let ((id (object-address package))) + (hashv-set! %package-table id package) + (list id + (package-name package) + (package-version package)))) + (#f #f)) + package-replacement)) + (#f #f) + ((id name version) + (inferior-package (inferior-package-inferior package) + name + version + id)))) + (define (inferior-package-provenance package) "Return a \"provenance sexp\" for PACKAGE, an inferior package. The result is similar to the sexp returned by 'package-provenance' for regular packages." -- 2.30.1 From debbugs-submit-bounces@debbugs.gnu.org Mon May 03 16:51:10 2021 Received: (at 47986) by debbugs.gnu.org; 3 May 2021 20:51:10 +0000 Received: from localhost ([127.0.0.1]:48649 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldfX4-0005Dq-Fa for submit@debbugs.gnu.org; Mon, 03 May 2021 16:51:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55074) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldfX3-0005Di-1g for 47986@debbugs.gnu.org; Mon, 03 May 2021 16:51:09 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34274) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldfWx-0003Wq-PC; Mon, 03 May 2021 16:51:03 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54712 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ldfWv-0003yN-Ac; Mon, 03 May 2021 16:51:03 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Christopher Baines Subject: Re: bug#47986: [PATCH] inferior: Support querying package replacements. References: <20210424054509.7740-1-mail@cbaines.net> Date: Mon, 03 May 2021 22:50:59 +0200 In-Reply-To: <20210424054509.7740-1-mail@cbaines.net> (Christopher Baines's message of "Sat, 24 Apr 2021 06:45:09 +0100") Message-ID: <87bl9rv8wc.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 47986 Cc: 47986@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Christopher Baines 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. Could you add a docstring and ideally a test? (There might be complications for the test, let=E2=80=99s see how it goes.) Thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri May 14 04:42:05 2021 Received: (at 47986) by debbugs.gnu.org; 14 May 2021 08:42:05 +0000 Received: from localhost ([127.0.0.1]:44963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhTOX-00036L-3D for submit@debbugs.gnu.org; Fri, 14 May 2021 04:42:05 -0400 Received: from mira.cbaines.net ([212.71.252.8]:36002) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhTOU-000361-HJ for 47986@debbugs.gnu.org; Fri, 14 May 2021 04:42:03 -0400 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:8ac0:b4c7:f5c8:7caa]) by mira.cbaines.net (Postfix) with ESMTPSA id 1EB4727BC78 for <47986@debbugs.gnu.org>; Fri, 14 May 2021 09:42:01 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 4751a0d1 for <47986@debbugs.gnu.org>; Fri, 14 May 2021 08:42:00 +0000 (UTC) From: Christopher Baines To: 47986@debbugs.gnu.org Subject: [PATCH v2] inferior: Support querying package replacements. Date: Fri, 14 May 2021 09:42:00 +0100 Message-Id: <20210514084200.5896-1-mail@cbaines.net> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 47986 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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. --- guix/inferior.scm | 22 ++++++++++++++++++++++ tests/inferior.scm | 18 ++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/guix/inferior.scm b/guix/inferior.scm index eb457f81f9..7c8e478f2a 100644 --- a/guix/inferior.scm +++ b/guix/inferior.scm @@ -90,6 +90,7 @@ inferior-package-native-search-paths inferior-package-transitive-native-search-paths inferior-package-search-paths + inferior-package-replacement inferior-package-provenance inferior-package-derivation @@ -462,6 +463,27 @@ package." (define inferior-package-transitive-native-search-paths (cut %inferior-package-search-paths <> 'package-transitive-native-search-paths)) +(define (inferior-package-replacement package) + "Return the replacement for PACKAGE. This will either be an inferior +package, or #f." + (match (inferior-package-field + package + '(compose (match-lambda + ((? package? package) + (let ((id (object-address package))) + (hashv-set! %package-table id package) + (list id + (package-name package) + (package-version package)))) + (#f #f)) + package-replacement)) + (#f #f) + ((id name version) + (inferior-package (inferior-package-inferior package) + name + version + id)))) + (define (inferior-package-provenance package) "Return a \"provenance sexp\" for PACKAGE, an inferior package. The result is similar to the sexp returned by 'package-provenance' for regular packages." diff --git a/tests/inferior.scm b/tests/inferior.scm index f227e0b749..864bab86da 100644 --- a/tests/inferior.scm +++ b/tests/inferior.scm @@ -26,6 +26,7 @@ #:use-module (gnu packages) #:use-module (gnu packages bootstrap) #:use-module (gnu packages guile) + #:use-module (gnu packages sqlite) #:use-module (srfi srfi-1) #:use-module (srfi srfi-34) #:use-module (srfi srfi-64) @@ -260,6 +261,23 @@ (list (inferior-package-derivation %store guile "x86_64-linux") (inferior-package-derivation %store guile "armhf-linux"))))) +(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"))))) + (test-equal "inferior-package->manifest-entry" (manifest-entry->list (package->manifest-entry (first (find-best-packages-by-name "guile" #f)))) -- 2.30.1 From debbugs-submit-bounces@debbugs.gnu.org Fri May 14 04:45:33 2021 Received: (at 47986) by debbugs.gnu.org; 14 May 2021 08:45:33 +0000 Received: from localhost ([127.0.0.1]:44967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhTRt-0003Bw-L0 for submit@debbugs.gnu.org; Fri, 14 May 2021 04:45:33 -0400 Received: from mira.cbaines.net ([212.71.252.8]:36018) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhTRs-0003Bo-9j for 47986@debbugs.gnu.org; Fri, 14 May 2021 04:45:33 -0400 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:8ac0:b4c7:f5c8:7caa]) by mira.cbaines.net (Postfix) with ESMTPSA id CF73027BC78; Fri, 14 May 2021 09:45:31 +0100 (BST) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id ca0eacc7; Fri, 14 May 2021 08:45:31 +0000 (UTC) References: <20210424054509.7740-1-mail@cbaines.net> <87bl9rv8wc.fsf@gnu.org> User-agent: mu4e 1.4.15; emacs 27.1 From: Christopher Baines To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#47986: [PATCH] inferior: Support querying package replacements. In-reply-to: <87bl9rv8wc.fsf@gnu.org> Date: Fri, 14 May 2021 09:45:31 +0100 Message-ID: <87y2chd7pw.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 47986 Cc: 47986@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Christopher Baines 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. > > Could you add a docstring and ideally a test? (There might be > complications for the test, let=E2=80=99s see how it goes.) I've sent an update patch now. Maybe the test should search out for a package without a replacement, as well as a package with a replacement, so that it tests both cases, but I just went with a simpler approach for now. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmCeOKtfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XcWNA//c4pagZOJaaNS5gWu7WLrALeB/fS7E7Jn 5TJqbyud4lW2+M9AV8UHjLiF3VyoZNoNPDJZosLw6SkVLXgMbQQWnpklQnuU3Xt6 k3IHXDevS2Y4WuMpVWuOyvvaKoI0DniJ2NlXGKc/3R1FRysqUkxPe3hiPH0X+J+h A4zGHDdVTVii97YJxXaVwovR3Q9VTTAWWIPG8BvNZJfsgbwcgxEy40zo5rYkv3tS Eb1xA6B9S0K1obkWczVQIHHdJAhkONTf1/7NSRCvmlFjgvnKthbbn26k01CGG1yT O0hjgs2je/mrxZe3xEjiF/V3hQ0Wfc42c9VYfTZ6QjuSNZsydD2/sQo9tMRNtmt4 jQ66Xb5NTzhyW03eNlpJMA/Dq91pDVQUvzMDkzDOsEvfGYdkwemVY8hycb51RmU0 RoHQSuSkpRBg01Ouy0YUBeqrqKmZfTI1LF90WuC/oPWZZpnyTUwCjw5df8kAQQHw +1Fv8HDpXS8+U6sh4jfTxZ7kSDs901Zx1LygN6EOdrDpgEwwEUz3t2TGugxqBNYz uOMfNvvu4JRIIe0CoEVIFReJSxRjx0J9bfxXXgjunxivVRrTGMupPz4ILklv4ML7 Ad9hTq0SxoXkQ7FC4jiEyuc/PJT20Kil/OGRg8rNcHon0Os6ob2X07hDsOrE9u08 AYoVlto25WI= =oGeG -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat May 15 06:12:06 2021 Received: (at 47986) by debbugs.gnu.org; 15 May 2021 10:12:06 +0000 Received: from localhost ([127.0.0.1]:47662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhrHB-0007f3-Vu for submit@debbugs.gnu.org; Sat, 15 May 2021 06:12:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhrH9-0007e7-Rp for 47986@debbugs.gnu.org; Sat, 15 May 2021 06:12:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40018) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhrH4-0002c9-MG; Sat, 15 May 2021 06:11:58 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=51174 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhrH4-0001SD-9w; Sat, 15 May 2021 06:11:58 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Christopher Baines Subject: Re: bug#47986: [PATCH] inferior: Support querying package replacements. References: <20210424054509.7740-1-mail@cbaines.net> <20210514084200.5896-1-mail@cbaines.net> Date: Sat, 15 May 2021 12:11:56 +0200 In-Reply-To: <20210514084200.5896-1-mail@cbaines.net> (Christopher Baines's message of "Fri, 14 May 2021 09:42:00 +0100") Message-ID: <87eee8l30z.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 47986 Cc: 47986@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Christopher Baines 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 =E2=80=A6) =E2=80=A6) and similar. That way we=E2=80=99ll notice when the test is skipped. Otherwise LGTM, thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat May 15 07:15:53 2021 Received: (at 47986-done) by debbugs.gnu.org; 15 May 2021 11:15:53 +0000 Received: from localhost ([127.0.0.1]:47717 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhsGv-0003R4-1O for submit@debbugs.gnu.org; Sat, 15 May 2021 07:15:53 -0400 Received: from mira.cbaines.net ([212.71.252.8]:37330) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhsGt-0003Qs-KH for 47986-done@debbugs.gnu.org; Sat, 15 May 2021 07:15:52 -0400 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:8ac0:b4c7:f5c8:7caa]) by mira.cbaines.net (Postfix) with ESMTPSA id 871CC27BC78; Sat, 15 May 2021 12:15:50 +0100 (BST) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 989d346f; Sat, 15 May 2021 11:15:49 +0000 (UTC) References: <20210424054509.7740-1-mail@cbaines.net> <20210514084200.5896-1-mail@cbaines.net> <87eee8l30z.fsf_-_@gnu.org> User-agent: mu4e 1.4.15; emacs 27.1 From: Christopher Baines To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#47986: [PATCH] inferior: Support querying package replacements. In-reply-to: <87eee8l30z.fsf_-_@gnu.org> Date: Sat, 15 May 2021 12:15:49 +0100 Message-ID: <87v97kcknu.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 47986-done Cc: 47986-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Hi, > > Christopher Baines 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 =E2=80=A6) =E2=80=A6) and similar. > > That way we=E2=80=99ll notice when the test is skipped. Sure, I've made those changes now. > Otherwise LGTM, thanks! Great, I've pushed this as 97d615b1761c2054561057f6b56e2a0caed13aa4. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmCfrWVfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XfMIQ/+JoHBgVeivemNtbdN1V6osf3AU0xsjGUW owJyEdX/5wOA/g8O55J0AgeFSXM94esj2yE2Vw/6iEXOZrfRKgSNn6SWFN5g4sAD 5e1HJRtb+BK23vkFv5EE5DfwE36UQHl6yb5d5IfNVyP3sOVwc255yEZfO4FUEEGD nVdNBeLXAG+CyAKn8jSIKFaDX5l7/ZU87P4bGA1n0nyzrc50BP6p8mhLt6tNq/rP 0mMPjZ6sArMckT75N2JselVdcl+6z41jk6Inw418duDBKEK3Ke1m1Xzdnu2TPzzC WqEjQujW9ahxVkUaTPkKMJAoRvTj+oW9T0pGGV0043AkO+3xK7kdj89NYpj8ZbwS Awq1p9/8GKJL1e2OrY/sKAQb9z18sd51gFqh2Tii7nmYthU2YOoLUfb+ioSFpKAS YEFLfwg6Jb5TmDOtoz3F4igT4RzS3z98HkgHv80TvtvqkgvZhzuak7Z38DwS6Eky AOW2iumaurQEAdA4YAQsFbYpp2ykstLl3TqJ2yaZ6r3B9aQb0Md45QM6sJiVhhan Lf2/jTGSIfi2nrj+3I6rzlLvVQn1G9mme2aV9w/zMGQ+DwhLFyo2pKhJb6X3ET7m lr1/d44R2wioP9faJblvVvMdj2ey6f0kasJC135n2Mng8+bY1PPD/nEno8PqU5ya DH/ZhXP1V7g= =iRQA -----END PGP SIGNATURE----- --=-=-=-- From unknown Fri Jun 20 07:09:02 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 12 Jun 2021 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator