From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id EBYpCzSgn2BRXwEAgWs5BA (envelope-from ) for ; Sat, 15 May 2021 12:19:32 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id gJ+xBjSgn2CYOAAAbx9fmQ (envelope-from ) for ; Sat, 15 May 2021 10:19:32 +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 D516F21CFC for ; Sat, 15 May 2021 12:19:31 +0200 (CEST) Received: from localhost ([::1]:35984 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhrON-0002R3-0N for larch@yhetil.org; Sat, 15 May 2021 06:19:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35188) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhrI6-0006Oj-01 for guix-patches@gnu.org; Sat, 15 May 2021 06:13:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36119) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lhrI5-0003FN-PA for guix-patches@gnu.org; Sat, 15 May 2021 06:13:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lhrI5-0007gd-Jm for guix-patches@gnu.org; Sat, 15 May 2021 06:13:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47986] [PATCH] inferior: Support querying package replacements. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 15 May 2021 10:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47986 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Christopher Baines Cc: 47986@debbugs.gnu.org Received: via spool by 47986-submit@debbugs.gnu.org id=B47986.162107352629458 (code B ref 47986); Sat, 15 May 2021 10:13:01 +0000 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= 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-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=1621073971; 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: content-transfer-encoding:content-transfer-encoding:resent-cc: 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=/tZuXeuh62Zs6FanQ58DIM89YilGEplaQdFf/aiyH5U=; b=McdgubXR8I7bJyya+Tt508W3LdTas7No+ouXL8r0F74GM5+sTjQcacx4nEzEoImpZH4nKD DLapjHsBhv913vTTgsUnLONDb77BxSYpy8HwC9Y/7KggaiIO6zSSARjL3OfwWxq7MVRxCj 0HizaJzD/y491nCtIOzupu9O6mOvCPG0kMes2b1QDtz5+2LipkE2F3g3rA3qrrh01e1cYP CWCYhB6qwmHscQxnXLf/BSDtKx93Yn6uw54+/ig/CT/3LSyhsPWLADM7nnAGlIpncS4ufV wTN63FqVzoAg2XpBPFWqIeVAF9OYjnP9TP+50nIxes4tClEKr8QgXkD3HNjPGw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621073971; a=rsa-sha256; cv=none; b=uD+e2aLR4kXNtiZHBMG458IGGinCHxdhUc1jO8v3zCmqUHu+SkSMw02t/xvHGo0C90VNgg 40BSbo/hAuiPJXnh/dT2GzOem4bw8uHf377RTIEn/yVEsjO7FDV/U64n9S5aQ5cvOjzEFa dQJaQByHt1mS7fVzrhgoYNIkyWHu4e4zJUUmoZBfyArhqFtDvEcB/3hGQXL3MJBdjzWeYH LO9/NTqZB+Axk+pTtl4VbWefJD01DW7vBYly1Vpr6ZqmusmcLo/pH2nXz40OcwF29R7GI/ jTLd33n2XUBir3I/hOKjJfDPZhywvwqAqf/KzLYyX+bBJgFxC4n96VCwzTb26A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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: -2.95 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: D516F21CFC X-Spam-Score: -2.95 X-Migadu-Scanner: scn0.migadu.com X-TUID: +6X2HoIldwM5 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.