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 ms9.migadu.com with LMTPS id 2Cz9IJia+2S3BAAAauVa8A:P1 (envelope-from ) for ; Sat, 09 Sep 2023 00:05:12 +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 2Cz9IJia+2S3BAAAauVa8A (envelope-from ) for ; Sat, 09 Sep 2023 00:05:12 +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 5A13B5887D for ; Sat, 9 Sep 2023 00:05:11 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=gF+3+ICd; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1694210711; 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:dkim-signature; bh=FFxf7U5aSyVrU6SxocAr7LqQ3J0rsIwU2isc4fowxwI=; b=aBV8k5/Y+H9UJyc6JySgRm/LlB8g9XqDJ57u5+pN0GE4Eb1OeyG2MtTSkGbq0KG0VpfUIi yedHY/PCcncZukD6TflMAToCHQ2q35xQDqJnzG1AO6ATT+Jhock5uR+CCgwvS1rn3Ndryd LWry2INyBvkjOjByovX41W3TdmGRf1zn+4IExmb826K8qygHCYgq/CLa/WZEgOehvQZco2 5A3wM7yKr9a+Wofi1uMkGKB5UpuVFz4lXs28Wp9IYXXR2xHc9JIrYbSw23FaFCN3QUZ80k FA+QUBgGYBpkTeu4ZrvoYqC548+Ggw9/QhIa1xLLZasc0j6+HGG7V279PZzb2Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=gF+3+ICd; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1694210711; a=rsa-sha256; cv=none; b=OpXuRQwrwD2phc+JOckZVjx/Fqvcao2G+WjSJmJzxmbz/F2YbZdQOj/qAbEA3yzcH/x3LW pcAty+HmIfjg/GwOMw/OhJSi/YOBsoHIILasYvCVRLP9pbMBvktloYkDrf21uvQj8quKi5 9zjKOuQjXJM/5NZkqQY1jg78QEYlVOs1zc1F7Aigww2nSdomTWwWgwQJ9CVPQAGgCFNOYN ECQlTdSHFiP0HIYciHTkbHtpEj414UG/W1smx3Bpt+qT6pF5Kdn6TnY+DDXtWA8NeIKijb 1vQXkmTSBZbJJ/hUyzObigMRd8Y5LQ5FD/W1Sj3StosINMueWG+hMrKZSDSMbw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qejb4-0007tA-T3; Fri, 08 Sep 2023 18:05:02 -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 1qejb2-0007sv-VY for guix-patches@gnu.org; Fri, 08 Sep 2023 18:05:00 -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 1qejb2-0006Ea-NX for guix-patches@gnu.org; Fri, 08 Sep 2023 18:05:00 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qejb4-0001Gv-J7 for guix-patches@gnu.org; Fri, 08 Sep 2023 18:05:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65062] [PATCH core-updates 1/1] packages: Specify output in input label when it's not "out". Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 08 Sep 2023 22:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65062 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: moreinfo patch To: Hilton Chain Cc: Josselin Poiret , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , Ricardo Wurmus , 65062@debbugs.gnu.org, Christopher Baines Received: via spool by 65062-submit@debbugs.gnu.org id=B65062.16942106494826 (code B ref 65062); Fri, 08 Sep 2023 22:05:02 +0000 Received: (at 65062) by debbugs.gnu.org; 8 Sep 2023 22:04:09 +0000 Received: from localhost ([127.0.0.1]:45786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qejaD-0001Fm-08 for submit@debbugs.gnu.org; Fri, 08 Sep 2023 18:04:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56784) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qejaA-0001FH-Td for 65062@debbugs.gnu.org; Fri, 08 Sep 2023 18:04:08 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeja0-00066Z-PE; Fri, 08 Sep 2023 18:03:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=FFxf7U5aSyVrU6SxocAr7LqQ3J0rsIwU2isc4fowxwI=; b=gF+3+ICdFi1fSdI7wATq 7Lt9tSNuxaRTN1+rZt8E4zy5bgysZlwKfHHfsZSTu5fGGCAKHvE7ny/g43wY+6BJOc07133NhkBcM KtnfNWHOAj9r0EcOP8McdbFeavdjrmXyUnolFoWOyCzjv1h+fYStuVDuLDucxOoA3mcqSkG2KFVuQ cEx7WyP2y/SE1orfUt0GUisc7Wq+FlcPoEXjgMb/IKtEHIodx46h6jsbQH+emRtHoFxAmJKqkP2Yx rjGEwakdLfLVi6ajsm/8PpJrdXZv3fmNNT+7c/avt8IIf12iWhRQ1cMWlCXlCVpN5hQ7aD0/eYfx9 1QK1t2SsSRPrXw==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <875y575apr.fsf@gnu.org> <87msyhumwj.wl-hako@ultrarare.space> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Duodi 22 Fructidor an 231 de la =?UTF-8?Q?R=C3=A9volution, ?= jour de la Noisette X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 09 Sep 2023 00:03:53 +0200 In-Reply-To: <87msyhumwj.wl-hako@ultrarare.space> (Hilton Chain's message of "Thu, 24 Aug 2023 11:42:04 +0800") Message-ID: <87msxw1fw6.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 5A13B5887D X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -1.70 X-Spam-Score: -1.70 X-TUID: PJvcnQ0Mp31o Hi, Hilton Chain skribis: >> Hilton Chain skribis: >> >> > * guix/packages.scm (add-input-label): Specify output when it's not "o= ut". >> >> [...] >> >> > + (list (string-append (package-name package) ":" output) >> > + package >> > + output))) >> >> The Grand Plan=C2=B9 is to eventually get rid of labels entirely (or alm= ost: >> there=E2=80=99d still be input alists on the build side). As such, I th= ought we >> shouldn=E2=80=99t worry too much about what the actual label is. But pe= rhaps >> you stumbled upon situations where this is a problem? Could you >> describe them? [...] > My main concern is that currently modify-inputs, this-package-input > and this-package-native-input operate on input labels and there would > be duplicated labels if adding multiple outputs of a package. > > For modify-inputs, I think there's no approach to solve this without > also specifying labels in inputs. Yes, good point. Another, more radical approach, would be to change semantics, whereby (inputs (list p)) would mean that all the outputs of =E2=80=98p=E2=80=99, n= ot just =E2=80=9Cout=E2=80=9D, are taken as inputs. That=E2=80=99d simplify inputs= at the expense of precision, and (this-package-input NAME) would always be unambiguous. But maybe that=E2=80=99s too radical and uncertain. So all things considered, I guess you=E2=80=99re right and we should do wha= t you propose. Minor issues: > --- a/guix/packages.scm > +++ b/guix/packages.scm > @@ -626,7 +626,13 @@ (define (add-input-label input) > ((? package? package) > (list (package-name package) package)) > (((? package? package) output) ;XXX: ugly? > - (list (package-name package) package output)) > + (if (string=3D? output "out") > + ;; (package "out") =3D> ("package" package "out") > + (list (package-name package) package output) > + ;; (package "output") =3D> ("package:output" package "output") > + (list (string-append (package-name package) ":" output) > + package > + output))) Rather write it as two separate clauses, without comments: (((? package? package) "out") =E2=80=A6) (((? package? package) output) =E2=80=A6) Could you also add a test case in =E2=80=98tests/packages.scm=E2=80=99 that= would look up inputs by those labels? Thanks, Ludo=E2=80=99.