From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id eHg0K9fj6WTcMgEAG6o9tA:P1 (envelope-from ) for ; Sat, 26 Aug 2023 13:36:55 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id eHg0K9fj6WTcMgEAG6o9tA (envelope-from ) for ; Sat, 26 Aug 2023 13:36:55 +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 7469046388 for ; Sat, 26 Aug 2023 13:36:55 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=envs.net header.s=modoboa header.b=gCL7PXy6; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=quarantine) header.from=envs.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1693049815; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=dWqCtB6ude7otmAza3mZgG2YQdQSabxBvnFsBys4TQI=; b=AmIL3IRIKS71qRtiqJqrXqEC8FTnZ5WvJ4ItCISS2rGFzmltOrysAwkzoOe+GvD5NgQf0z hZAZM/QYG3B4w9Mztzq/p8iUSortbyXDvvRvjXHIoupHtclG37BJXPTij1uctQs32tiT+w rljLlO9HJEHzcLa6PnarDvw1lz8NFlmiECSAtBPjs2YszlSVOE9CPxQ879WrREHO2Pcs0L nXmTVE+NDYc0PRK/0c2NAUfVEwaUrkhaiHO86i91TTYBp8B67v0uvjIT62w1tcV1cykyox EcqEoL6wwjTQDdOd7ZbhkA9gbzlqTqzqYlhIdqIw5j2x3uISa96PcbNby1IX7w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=envs.net header.s=modoboa header.b=gCL7PXy6; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=quarantine) header.from=envs.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1693049815; a=rsa-sha256; cv=none; b=ekhGqckknlu5uHk/KqMDie9Zyk2GQX08xS4YsmYQ9xLnlO3F0sjicVwtQH8zYFK84SyoV/ rpcfbIAeRQpm5sW69FqemKlagmi/ap4K+NOujL+sfhLbHKoL6oa+jf+WK6VADQ5jDFLbis D2jwkYbF9uI0/n/Plzezk2eS2/LKvRj+20eZcM3cMy7SGpus1qDYcoseTjVEK7rqAnRrZc tTYZzBLHVXmZP8lmFMKdAbSOm/57dkSYpO+Ro+/6UuVrMfxlHtcJAVirH1+euJo7MnhRJc AEYJVOvFP5rv0Ncs59qleK8bKDi0VNBZKFlKcCG0TXMM4R6jotppUJLf5xqCKQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qZraV-0001so-TL; Sat, 26 Aug 2023 07:36:19 -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 1qZraT-0001sG-E4; Sat, 26 Aug 2023 07:36:17 -0400 Received: from mail.envs.net ([5.199.136.28]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qZraQ-0008AK-5S; Sat, 26 Aug 2023 07:36:17 -0400 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 7AAC038A0135; Sat, 26 Aug 2023 11:36:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1693049762; bh=dWqCtB6ude7otmAza3mZgG2YQdQSabxBvnFsBys4TQI=; h=From:To:Cc:Subject:Date:From; b=gCL7PXy6YS4TaqNPvDuXylH2DX/NfG0BSuQbtp3BembyLYFGbHiDmCcEomXwLgQBa aRAEsHPuOTOExu/EsSRbyuEdS14boTOUXaGRnVtkr/YVFpPIlaDBR0Vq8tmlkZO/Yq +eOlj7nNBlgsRIsDLukG3UeZtfUMsIj9++flgaZc0B1iGXTOwq2nxq4E34MTkXJ9U+ rOs+ighZm014K67Qr3jGbYd027t9kmx1n8Tebws2Vv4A9q0GRKjY2rFobtiFVObxt2 gcQ+LDz6j+P3pkhSpVjVLzT9PSqywFlhZ6LZKtK6YE6spdst51CdsvoYzCC6bUP1Jm I8gcVLoXTl/gSoQ7aGUPW9jJmnnzvAHZhE04jECfOZV1rG547LQMWVxm7F4WrTaby+ fM6A4biB6oqv0EM//LBOjkif4BHRGdfg/N7JRE7EHg9Smlvpf5+yc3aeHB3+WNrLHr 386hfZYT43PRIjHZRFgTTwF2MCWoQVFvUfsUdB/Inl38Y4p24q6ZvjJsJuLt9Idyzr slBXQz/JduTkZaYTK3FCCaUy4PtapPjZtPBp49gWZJLx8U3fyxmehaNAesEGc1WETM Ljt0+S0qCA+hFEpUhNDSCX7S8uKxzpyJBuQ0AAvfX7+140/cl7YSJCuo79saSTc+4K K3eKMh38clzTY+xwcLwJQZSI= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id zXFci15z9Pa6; Sat, 26 Aug 2023 11:35:59 +0000 (UTC) Received: from localhost (unknown [36.170.44.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Sat, 26 Aug 2023 11:35:58 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 4f4efede; Sat, 26 Aug 2023 11:36:05 +0000 (UTC) From: =?utf-8?B?5a6L5paH5q2m?= To: guix-patches@gnu.org Cc: guix-devel@gnu.org Subject: Don't add propagated-inputs for all outputs Date: Sat, 26 Aug 2023 19:36:05 +0800 Message-ID: <87ttsm828q.fsf@envs.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=5.199.136.28; envelope-from=iyzsong@envs.net; helo=mail.envs.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx2.migadu.com X-Migadu-Spam-Score: -9.58 X-Spam-Score: -9.58 X-Migadu-Queue-Id: 7469046388 X-TUID: LqD1HUKBawrs --=-=-= Content-Type: text/plain Hello, we have a TODO for "extend `propagated-inputs` with support for multiple outputs". I try to do it for a while, but unable to find a clear way, since add a new syntax for specify output in propagated-inputs require changes in too many places.. Think about the intention, what we want is to avoid unwanted propagated-inputs for building a package or user profiles, and propagated-inputs is mostly used for development packages which requiring headers/libraries from its inputs. It seems I can hardcode the choice here to the "dev" output (if a package have both "dev" and "out", its "out" should considered be an application) or the "out" output (a library/development package). Then the change is straight: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-packages-Don-t-propagate-inputs-for-non-development-.patch >From 98a8666a0cbf33e24efff615243b98144a92c950 Mon Sep 17 00:00:00 2001 Message-ID: <98a8666a0cbf33e24efff615243b98144a92c950.1693047369.git.iyzsong@member.fsf.org> From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Date: Sat, 26 Aug 2023 18:27:09 +0800 Subject: [PATCH] packages: Don't propagate inputs for non-development package outputs. * guix/packages.scm (transitive-inputs): Only include propagated inputs from a package for its "dev" output, or its "out" output if the package doesn't have a "dev" one. --- guix/packages.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/guix/packages.scm b/guix/packages.scm index ba98bb0fb4..435d55de71 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -1143,7 +1143,13 @@ (define (transitive-inputs inputs) (loop rest result propagated first? seen) (loop rest (cons input result) - (cons (package-propagated-inputs package) propagated) + ;; Only add propagated inputs for PACKAGE:dev, or PACKAGE:out + ;; when PACKAGE doesn't have a "dev" output. + (if (if (member "dev" (package-outputs package)) + (member "dev" outputs) + (or (null? outputs) (member "out" outputs))) + (cons (package-propagated-inputs package) propagated) + propagated) first? (vhash-consq package outputs seen)))) ((input rest ...) base-commit: eeb71d778f149834015858467fbeeb1276d96d1d -- 2.41.0 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Not much benifits now, but i think it will helps when we have more mulitple outputs packages. Also how about add a slimming team aiming to reduce the closure size of packages and system, anyone interested? Thanks. =F0=9F=A5=B3 --=-=-=--