From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id UOA2NJmtn2DpdwEAgWs5BA (envelope-from ) for ; Sat, 15 May 2021 13:16:41 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id iPxLL5mtn2BscAAAB5/wlQ (envelope-from ) for ; Sat, 15 May 2021 11:16:41 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 83F3E24792 for ; Sat, 15 May 2021 13:16:41 +0200 (CEST) Received: from localhost ([::1]:33870 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhsHg-0007UB-5Z for larch@yhetil.org; Sat, 15 May 2021 07:16:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42974) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhsH5-0006Va-P6 for guix-patches@gnu.org; Sat, 15 May 2021 07:16:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36174) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lhsH4-0001NX-Af for guix-patches@gnu.org; Sat, 15 May 2021 07:16:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lhsH4-0003Ri-6Y for guix-patches@gnu.org; Sat, 15 May 2021 07:16:02 -0400 Subject: bug#47986: [PATCH] inferior: Support querying package replacements. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Sat, 15 May 2021 11:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 47986 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 47986-done@debbugs.gnu.org Mail-Followup-To: 47986@debbugs.gnu.org, mail@cbaines.net, mail@cbaines.net Received: via spool by 47986-done@debbugs.gnu.org id=D47986.162107735313214 (code D ref 47986); Sat, 15 May 2021 11:16:02 +0000 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 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621077401; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-to:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post; bh=7yLJe6GIC0UBEP0cY1XIxJFanfEmy0GBVmFOvPbJDWI=; b=QbinT7NpWLffnhtOgieIXG3LZ2cyxrA+tif0f1/6uxuDWz+4bg6SsD2mjJyLeYezkmjomO hwaJZCp6p+wAHZ00w0CQ+MBDir6MeLXHONm/4enj1svB0NXO755NHoDMDjNF1W3Scyu66M 4r3Rd7jpduiV4lH9xl3pOJ8nQ7sB2rCSTxM1EnVfzrKyrKSTiH2PRmc8bxq3Ze5xP8KNzo 7JspLLShTvdKRMVlpqAholntXH+TSL85okQDHzrTpNZKT6zhba7ihDQfYFSDQoiJ+jgkkP Z5EOZwqP+hFzvoHpkdoj6osBKMr35i1BB4s55Sa5KVTUGqV+eCFsyJ1+9NF8vg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621077401; a=rsa-sha256; cv=none; b=Z6KhpomdNGTTFe965JWgC1a52r5Fc5kz27m0c9NDzbT9YJlfBPMu83cAEvgshtFenp9bgT 2LzIfd+e8s8hdpZmiODIrffKC9d4IcphNgkZ9GJmg7VPfIPWL8RqOMoWWx6DzLXnNxHkt4 BDVNaz7ehMIPLj044Z/ZZrK5ppJwg6v7ECdxIareA5UwRYRgV2W19pVI4X5CErjbVpO6hV BkzNY27xIa4ZSq1u0aMQnI0BbKTHOrz9bSvkF3TyS4kRjfRAUJ9yL4KqIC6TiwZIuPydVg mbDAidmyoM1qRCsiIPXHFmKFqJPDm+hTp+ti/4LZy076J0Vx+W1f51UDvzfQvQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -4.55 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 83F3E24792 X-Spam-Score: -4.55 X-Migadu-Scanner: scn0.migadu.com X-TUID: jSYnrZu/S952 --=-=-= 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----- --=-=-=--