From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id qLGxA4+iKGU+MQEAauVa8A:P1 (envelope-from ) for ; Fri, 13 Oct 2023 03:51:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id qLGxA4+iKGU+MQEAauVa8A (envelope-from ) for ; Fri, 13 Oct 2023 03:51:11 +0200 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 C78CB43962 for ; Fri, 13 Oct 2023 03:51:10 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tilde.club header.s=mail header.b=Jwz388PZ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=tilde.club (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1697161871; a=rsa-sha256; cv=none; b=YVYmBCGm1h/RW+BEDIqUbrjeg48TG2wx4Ok1DspIgeDN3WqCeYsllsizHx0Y5wqfFZbo99 FKMknwTsEzZ8+azOM9CRSHELiwIiPvnl5RthEq/7OLpDjRphGngMenFdVNzTWoxKk8QizV ZqLO5fCLUcIF1ldle3sCX6Z+IriN8/UFEfjDl8O7j7q7mKNOSF+XtEXshPvnh4g4/gxnzI 4JJNeJRyIpviUf8qJHVE305yPR/EOvm4DdXQD6wmnv8h4XSLAcWAaghmqB8mJfhysCVeLT NbjkWRkerxNokw/t/rUFiTD8aIWdJ+yNPVu99FIxi3KcP3daagPm9wVBP3JfZQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tilde.club header.s=mail header.b=Jwz388PZ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=tilde.club (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1697161871; 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-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: dkim-signature; bh=MjUXximVtyfENM/n8XAy3KkoYRODwQnxkgwokTuq5iU=; b=RJrSvlD1LZeeYr9UpyYUPcobx4q49/pMiHCq3AVYzGaDj/2WBwRqEAbrxt4jJzFUdZsGkR IIqPPYIiEMY8ENNoNhtlNvSESFIVDJIGzoqyTyk3f+wqXMpLKHVRUzEaejhzVFydn292EB L3wt5T1BSoHldqtsSu/oQd+EmLFQ47IZSTMeZVaZ8Cxu94Gpv565UerjDztU+yvBHuueRz RB7UCGIOsPYk99oZYX+YcayndyOq8YrTlpUZgOU5m1OX7ugqIMrnmztMHxh4OwwK0iRI+t M+sCnKzIYev4aYUiow9Fk0c7X2HfLnQWcIPeCb+MYU1kK+V6z8JHFLL9DOJD3Q== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qr7K6-0005aA-41; Thu, 12 Oct 2023 21:50:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qr7K4-0005a2-HY for bug-guix@gnu.org; Thu, 12 Oct 2023 21:50:40 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qr7K3-0001BY-F7 for bug-guix@gnu.org; Thu, 12 Oct 2023 21:50:40 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qr7KP-0005Py-Un for bug-guix@gnu.org; Thu, 12 Oct 2023 21:51:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#65665: package-mapping with #:deep? #t doesn't get all the implicit inputs Resent-From: Ulf Herrman Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 13 Oct 2023 01:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65665 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxim Cournoyer Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Ulf Herrman , 65665@debbugs.gnu.org Received: via spool by 65665-submit@debbugs.gnu.org id=B65665.169716181720767 (code B ref 65665); Fri, 13 Oct 2023 01:51:01 +0000 Received: (at 65665) by debbugs.gnu.org; 13 Oct 2023 01:50:17 +0000 Received: from localhost ([127.0.0.1]:44507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qr7Jg-0005Ot-GP for submit@debbugs.gnu.org; Thu, 12 Oct 2023 21:50:16 -0400 Received: from tilde.club ([142.44.150.184]:42110 ident=postfix) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qr7Jb-0005Oh-8v for 65665@debbugs.gnu.org; Thu, 12 Oct 2023 21:50:14 -0400 Received: by tilde.club (Postfix, from userid 5378) id 401BC2204ECD3; Fri, 13 Oct 2023 01:49:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 tilde.club 401BC2204ECD3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tilde.club; s=mail; t=1697161787; bh=jUh5U8Z/1V6ei3yssYGUlR1c8cQjHNiMgtgLwH3BsLk=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Jwz388PZWvUyXHCkAih1MJVHRgy7rOgKR3AYbTUAjNCCs5nkyzMC85pZNv3gt+Cae Qy8ZN6kycDp+P3jsWw28DQNbZ93Ks/hveC/IfxFA8bqLvER1ps8PXvhSNuyRsBZw8I iG9Q0GgTopQAtGPDXlfcsPPxht1GkdZTNMV5DeOM= From: Ulf Herrman References: <87h6ofufy5.fsf@tilde.club> <87cyxklzgg.fsf@gnu.org> <87lec796rc.fsf@gmail.com> Date: Thu, 12 Oct 2023 20:49:25 -0500 In-Reply-To: <87lec796rc.fsf@gmail.com> (Maxim Cournoyer's message of "Thu, 12 Oct 2023 11:53:43 -0400") Message-ID: <871qdzfg0q.fsf@tilde.club> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: 2.19 X-Spam-Score: 2.19 X-Migadu-Queue-Id: C78CB43962 X-TUID: qOEtBlEu0QBz --=-=-= Content-Type: text/plain Maxim Cournoyer writes: > Any build system accepting package as arguments are subject to this > problem, if I understand correctly. It's not quite everywhere a package is accepted as an argument: there are many cases where a package is passed as a package argument but doesn't end up in the arguments list of the corresponding bag. This is usually the case because that argument is only overriding a default package that is just added as an input to the bag, with no special treatment aside from being an implicit input. For example, #:cmake in cmake-build-system works this way. This is however not the case for #:qtbase in qt-build-system, and, much more prominently, for #:guile. Neither qtbase nor guile are added to bag inputs implicitly, but they do end up in the final builder, even if not specified. Concretely, this looks like this: --------------------------------- (use-modules (guix packages) (guix profiles) (gnu packages base)) (define guile-named-lyle (package (inherit (default-guile)) (name "lyle"))) ;; contrived example that only replaces hello's immediate dependencies (define hello-transformer (package-mapping (lambda (p0) (if (eq? p0 (default-guile)) guile-named-lyle p0)) (lambda (p) (not (eq? p hello))) #:deep? #t)) (define hello-with-lyle (hello-transformer hello)) (packages->manifest (list hello hello-with-lyle)) ;; $ guix build --derivations --manifest=THISFILE ;; Expectation: build for hello-with-lyle is done with guile-named-lyle. ;; Reality: derivation for hello-with-lyle is the same as hello. --------------------------------- (and I have confirmed that the above results in guile-named-lyle being used with the proposed patches applied) A similar problem manifests when one tries replacing (default-qtbase) in a package using qt-build-system. Both it and guile are in bag arguments and not inputs because it's not enough that they be included as inputs, the builder must also know which one is considered "used by the build system" if there are multiple. One could argue that this ambiguity also exists with other build systems - "which cmake should be used, which gcc should be used", etc - but they choose to resolve it with "eh, whatever shows up first in PATH matching the required name is probably fine". It's not unimaginable that there could be cases where explicitly specifying which package should be used for a particular role would be necessary, though. - Ulf --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHIBAEBCAAyFiEEn6BUn0yca1D9JsMa1lV76sJM9mgFAmUooikUHHN0cmluZXNz QHRpbGRlLmNsdWIACgkQ1lV76sJM9mgZ3gv+N+aiM4gJM3swNUPoc5C7QWKvgkU8 V0svynQ/4gFjHqDmqCBNzttgG4Cnquv7wm6RT8/U+PyifBCNzSsdRUmh/aGaajQy NLB4rIQ3Db8Secgg416bMULcCRyabgGyYH7Yx4LfBq5vI1WJ8vknJ6h/SeBhkqnP fPHzwaAO8L53GmlidlVkvYir8uLzr5I/si6Odzl6ewD2uT5K3DkGNwgqK5fD2HOz o/dIa355lBxia/mXtTcY/cXcnr5F8skLJvGOZWkWn8pAzBz++DkS8tZPzW9mMwiM VG/KKGT5mbEB2LvGajUh4u8dhVLlMIrCzT4HbH49GgrRBNfOl/IzdybZtBITlKHR 6g5K8aOWcBxGeBeuGY6N6if22fVUYDczseFNI5GicV15YPA6FgTTjgKUCNg3mYmU HuNzR5RDwvXYXEKLD6ICm1vOtbOwrAS6yVyiuZFtaBKBXoI+uazJxH/r/anCTjar Nwb5xoLqjDsPSZzBfynl/xMF9nnHNYc+Y22o =OGXK -----END PGP SIGNATURE----- --=-=-=--