GNU bug report logs - #43578
[PATCH 0/4] Rewriting implicit inputs with 'package-input-rewriting' & co.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Ludovic Courtès <ludo@HIDDEN>; Keywords: fixed patch; Done: Ludovic Courtès <ludo@HIDDEN>; Maintainer for guix-patches is guix-patches@HIDDEN.
bug closed, send any further explanations to 43578 <at> debbugs.gnu.org and Ludovic Courtès <ludo@HIDDEN> Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) fixed. Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 43578 <at> debbugs.gnu.org:


Received: (at 43578) by debbugs.gnu.org; 26 Sep 2020 16:04:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 26 12:04:21 2020
Received: from localhost ([127.0.0.1]:47630 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kMCgO-00081l-P5
	for submit <at> debbugs.gnu.org; Sat, 26 Sep 2020 12:04:21 -0400
Received: from mail-qt1-f196.google.com ([209.85.160.196]:42641)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1kMCgM-00081X-Ir
 for 43578 <at> debbugs.gnu.org; Sat, 26 Sep 2020 12:04:18 -0400
Received: by mail-qt1-f196.google.com with SMTP id y11so4852493qtn.9
 for <43578 <at> debbugs.gnu.org>; Sat, 26 Sep 2020 09:04:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc:content-transfer-encoding;
 bh=zRBFnKqUgw1NXewavCw8XnyWQeVrJ/rUXhmiEnM4tMI=;
 b=TfXjt5P6duIyzgr2PfUGMlS6Tr1+px2pRvBWr3sAyEjjh5vAoA/6WzOQO5lGGNhXdx
 sNSemP7c1ouKflhr3kat7NBhYFTF1y7ECFwngtqh8KrFSOToENqaErEVJxOsnKE5mTL7
 emUwdSrHjfdQsdBz0Bn5wlagQq+klpJItbYvUnGCfkf7aBwq5wCTNgMjPWDQyei3bQdw
 RLCpYukjonDJrGE8VdQk7yrZkD+g5kh513VjoK8Y02OOcy/S45g/Gx7WkbmalSjWgZwK
 l8ZV4S5lDg3IYZeYg6Bqa8RGUoXA3zhzwt/sygKathRjruEhGPJMwruuKUz0pkFW1NRH
 yeWA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc:content-transfer-encoding;
 bh=zRBFnKqUgw1NXewavCw8XnyWQeVrJ/rUXhmiEnM4tMI=;
 b=Xg7yxI3MmbPN5SivJP8QmOr3utMZDzmKJ0/v6FU5GC1CG14aF4+uvaGy2W6Wy5KXfM
 aM7UXxNoCviJoDgT5eDNFIjGDZDyMIlq++xiLris/WiwkissMqNc1d4m1QlzPbcuE7CG
 6CNrTjqitjjyZma4mue6+OpXOPa9jNYho/YYfiTuJa3wcs5gfAKuAU8k20efsCcohfHW
 rJqEwGVrQGExHpw8+kwTs+6N0DHvVnlCH0ysrjxd6na9+NU0vvEAtdIQI+cmJYc4YCbW
 MaBERkkFIZpiUtaLIaRDNo24uwaO6i5d/0aAyTtqrm1CcnIUDEziEr6+X6C23HnQvGmi
 CY6A==
X-Gm-Message-State: AOAM533o+yNJjeB9ixXKVbcWgd283dCDeu0xzxfw0Kd3I17+smTXI2uN
 trR6ZUSO+pNe5sG67fpshBMWS1DazWS0WnnccUc=
X-Google-Smtp-Source: ABdhPJzZrKbq4DKVFJo4DvEdZ1OUX8dBH0uCdQMOBwSs74zK29hYNuy3LZDaKvfeBt3/1q9GpvepjLI/6gW9qsCei8E=
X-Received: by 2002:ac8:5317:: with SMTP id t23mr5252178qtn.354.1601136252981; 
 Sat, 26 Sep 2020 09:04:12 -0700 (PDT)
MIME-Version: 1.0
References: <20200923161253.2378-1-ludo@HIDDEN> <86eemptrck.fsf@HIDDEN>
 <871riohceo.fsf@HIDDEN>
In-Reply-To: <871riohceo.fsf@HIDDEN>
From: zimoun <zimon.toutoune@HIDDEN>
Date: Sat, 26 Sep 2020 18:04:00 +0200
Message-ID: <CAJ3okZ2+vdFmTkbSWq2pWPOObWfc8Coi4854L38TpAsgNeYkKA@HIDDEN>
Subject: Re: [bug#43578] [PATCH 0/4] Rewriting implicit inputs with
 'package-input-rewriting' & co.
To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 43578
Cc: 43578 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Sat, 26 Sep 2020 at 15:53, Ludovic Court=C3=A8s <ludo@HIDDEN> wrote:

> Does it work for you if you do =E2=80=98--with-input=3Demacs-minimal=3Dem=
acs-next=E2=80=99?

Ahah!  Stupid me! :-)
Yes it works for me.  And it does what I wanted when discussing the
lengthy and controversial package parameters.  Thank you!

Cheers,
simon




Information forwarded to guix-patches@HIDDEN:
bug#43578; Package guix-patches. Full text available.

Message received at 43578 <at> debbugs.gnu.org:


Received: (at 43578) by debbugs.gnu.org; 26 Sep 2020 13:54:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 26 09:54:01 2020
Received: from localhost ([127.0.0.1]:46151 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kMAeG-0004OW-SN
	for submit <at> debbugs.gnu.org; Sat, 26 Sep 2020 09:54:01 -0400
Received: from eggs.gnu.org ([209.51.188.92]:45424)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1kMAeF-0004OK-OX
 for 43578 <at> debbugs.gnu.org; Sat, 26 Sep 2020 09:54:00 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:60296)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1kMAeA-0003xd-DR; Sat, 26 Sep 2020 09:53:54 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36168 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1kMAe9-0004DO-72; Sat, 26 Sep 2020 09:53:53 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: zimoun <zimon.toutoune@HIDDEN>
Subject: Re: [bug#43578] [PATCH 0/4] Rewriting implicit inputs with
 'package-input-rewriting' & co.
References: <20200923161253.2378-1-ludo@HIDDEN> <86eemptrck.fsf@HIDDEN>
Date: Sat, 26 Sep 2020 15:53:51 +0200
In-Reply-To: <86eemptrck.fsf@HIDDEN> (zimoun's message of "Sat, 26 Sep 2020
 00:38:03 +0200")
Message-ID: <871riohceo.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 43578
Cc: 43578 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi zimoun,

zimoun <zimon.toutoune@HIDDEN> skribis:

> I miss why the hash is the same.  I was expecting a different one, as
> with your =E2=80=99hello=E2=80=99 example (that I reproduce exactly).  Wh=
at do I miss?
>
> Note it is the same with:
>
> $ ./pre-inst-env guix build emacs-helm --with-input=3Demacs=3Demacs-next
> /gnu/store/ka9lph0hpzaky0sa52zf09469apkhb68-emacs-helm-3.6.5

That=E2=80=99s because =E2=80=98emacs-helm=E2=80=99 depends on =E2=80=98ema=
cs-minimal=E2=80=99, not =E2=80=98emacs=E2=80=99:

--8<---------------cut here---------------start------------->8---
$ guix graph --path -t bag emacs-helm emacs
guix graph: error: no path from 'emacs-helm@HIDDEN' to 'emacs@HIDDEN'
$ guix graph --path -t bag emacs-helm emacs-minimal=20
emacs-helm@HIDDEN
emacs-minimal@HIDDEN
--8<---------------cut here---------------end--------------->8---

Does it work for you if you do =E2=80=98--with-input=3Demacs-minimal=3Demac=
s-next=E2=80=99?

HTH,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#43578; Package guix-patches. Full text available.

Message received at 43578 <at> debbugs.gnu.org:


Received: (at 43578) by debbugs.gnu.org; 25 Sep 2020 22:38:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 25 18:38:15 2020
Received: from localhost ([127.0.0.1]:45474 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kLwM2-0003Xv-Nx
	for submit <at> debbugs.gnu.org; Fri, 25 Sep 2020 18:38:14 -0400
Received: from mail-wm1-f65.google.com ([209.85.128.65]:53725)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1kLwLz-0003Xe-H8
 for 43578 <at> debbugs.gnu.org; Fri, 25 Sep 2020 18:38:13 -0400
Received: by mail-wm1-f65.google.com with SMTP id x23so788775wmi.3
 for <43578 <at> debbugs.gnu.org>; Fri, 25 Sep 2020 15:38:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-transfer-encoding;
 bh=sotWYa/FgOmjmQqJyrloJF0CD/5nbk+2icWXZFoSDEQ=;
 b=DZB9LltwqPgb4JIsBc0YVanhvZPg94Tp9GfM8d3TGLW06nPDAwhW77a4l7kB13L2R3
 6vscs1fkxqi6MEZe3/BlAfRbhtSG7zf+uEbrWmDpa5hejBpwxmkrkMdXI2/aWeO5kSSF
 FP8QiB5oG6ZhwasOHmjgXQUZbxdbKAJMzKm+flt8SwE7i/LZiZZYjkjg1AdBMCl/cQ0z
 dRUFzTKKQcakO7AVkAPANwiuWy9RfA3VAIWM83lQiKUIbsXWGCBtu0C+HmadF03vc7ta
 clcAj+NSwbZpTtK8Enei3Iw6ilmLlB6zjVTc+m9wfVOWH3Te8b3aDBOLCdfI75JVN23e
 KqAA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version:content-transfer-encoding;
 bh=sotWYa/FgOmjmQqJyrloJF0CD/5nbk+2icWXZFoSDEQ=;
 b=XZxdLom0fvJCdhNLK3qXH5yQJZY0FpzaLuyhP+8MkjbSporOBmcii0MJpga36vAEAJ
 S0k4Dm9UgvUC96+dexkOHiRz9MEofr8REqY7t39DqSuzUSGLk0vd1sEyXIoCX3M/9HfL
 1YXj/kXMOCgYg6xUW/lF0h50U7lLbFBccoQ4vww7OhlNRvSSjTCgcThCLRebvjyCUZcf
 yaeztdMsBJ6sPIvgeQXjrtjod19ltXLbMWF54vqA7lFfj49TO9pszQLFexdIfAnzTpjW
 /ReHbxoNda04MK32epOxjCGPZJ3UOYHMCPLMVlhEO7z9Oe8OLYX0B4pC1eroMphbxPs5
 aXHQ==
X-Gm-Message-State: AOAM530dMXZ6Bxbqq6ukeWWd5gReGbOuplAWABaCUTgckpWZwHX34ZJO
 Y0ipYPuuzBhhid5UYi83c3DJRq7+HQo=
X-Google-Smtp-Source: ABdhPJzNPcCbU8JioEp3cRDqfLn/jZ37XDpKMX6QJHT44xQoln+iuZ/QF/EbG4S5oYSGhziKLYfucw==
X-Received: by 2002:a7b:cb82:: with SMTP id m2mr790038wmi.56.1601073485181;
 Fri, 25 Sep 2020 15:38:05 -0700 (PDT)
Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e])
 by smtp.gmail.com with ESMTPSA id x16sm4158126wrq.62.2020.09.25.15.38.03
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 25 Sep 2020 15:38:04 -0700 (PDT)
From: zimoun <zimon.toutoune@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#43578] [PATCH 0/4] Rewriting implicit inputs with
 'package-input-rewriting' & co.
References: <20200923161253.2378-1-ludo@HIDDEN>
Date: Sat, 26 Sep 2020 00:38:03 +0200
In-Reply-To: <20200923161253.2378-1-ludo@HIDDEN> ("Ludovic =?utf-8?Q?Cour?=
 =?utf-8?Q?t=C3=A8s=22's?= message
 of "Wed, 23 Sep 2020 18:12:53 +0200")
Message-ID: <86eemptrck.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 43578
Cc: 43578 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Ludo,

On Wed, 23 Sep 2020 at 18:12, Ludovic Court=C3=A8s <ludo@HIDDEN> wrote:

> Concretely, the following commands had no effect thus far:
>
>   guix build python-itsdangerous --with-input=3Dpython=3Dpython2
>   guix build hello --with-input=3Dgcc=3Dgcc-toolchain@10
>
> In both cases, this is because the input we want to change is
> an implicit input.  This patch set fixes that, and it fixes
> <https://issues.guix.gnu.org/42156> as a side effect.

Maybe I am doing wrong and I miss something.

For example, I want to build the package =E2=80=99emacs-helm=E2=80=99 =E2=
=80=93which does not
(directly) depends on the package =E2=80=99emacs=E2=80=99=E2=80=93 using th=
e package
=E2=80=99emacs-next=E2=80=99 (changing the Emacs VM from 27 to 28 in this c=
ase).

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix build emacs emacs-next
/gnu/store/7kr0pg7gwhc31q4iq5vbnm5n99srhp84-emacs-next-28.0.50.1-0.2ea3466
/gnu/store/q3c6y4ccj3li5gfdcbyz24n466fnipp1-emacs-27.1

$ cat /tmp/manif.scm
(specifications->manifest '("emacs-helm"))

$ ./pre-inst-env guix build -m /tmp/manif.scm
/gnu/store/ka9lph0hpzaky0sa52zf09469apkhb68-emacs-helm-3.6.5

$ ./pre-inst-env guix build -m /tmp/manif.scm --with-input=3Demacs=3Demacs-=
next
/gnu/store/ka9lph0hpzaky0sa52zf09469apkhb68-emacs-helm-3.6.5
--8<---------------cut here---------------end--------------->8---

I miss why the hash is the same.  I was expecting a different one, as
with your =E2=80=99hello=E2=80=99 example (that I reproduce exactly).  What=
 do I miss?

Note it is the same with:

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix build emacs-helm --with-input=3Demacs=3Demacs-next
/gnu/store/ka9lph0hpzaky0sa52zf09469apkhb68-emacs-helm-3.6.5
--8<---------------cut here---------------end--------------->8---


Well, I am trying to provide an example to [1] because your patch set
supersedes it, somehow.

[1] <http://issues.guix.gnu.org/41732#7>


(I have not yet tried the build transformation at the manifest level.)

All the best,
simon





Information forwarded to guix-patches@HIDDEN:
bug#43578; Package guix-patches. Full text available.

Message received at 43578 <at> debbugs.gnu.org:


Received: (at 43578) by debbugs.gnu.org; 24 Sep 2020 06:29:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 24 02:29:36 2020
Received: from localhost ([127.0.0.1]:38503 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kLKl6-0004Tb-8Q
	for submit <at> debbugs.gnu.org; Thu, 24 Sep 2020 02:29:36 -0400
Received: from flashner.co.il ([178.62.234.194]:54110)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <efraim@HIDDEN>) id 1kLKl4-0004TP-4N
 for 43578 <at> debbugs.gnu.org; Thu, 24 Sep 2020 02:29:35 -0400
Received: from localhost (unknown [31.210.181.177])
 by flashner.co.il (Postfix) with ESMTPSA id 3F93840045;
 Thu, 24 Sep 2020 06:29:28 +0000 (UTC)
Date: Thu, 24 Sep 2020 09:28:55 +0300
From: Efraim Flashner <efraim@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#43578] [PATCH 0/4] Rewriting implicit inputs with
 'package-input-rewriting' & co.
Message-ID: <20200924062855.GJ896@E5400>
References: <20200923161253.2378-1-ludo@HIDDEN>
 <CAJ3okZ1V-JAmgFGmWwRy+TRN5OiaD0zbmpjT2krfkCgn27f=9A@HIDDEN>
 <87y2l0b4ja.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
 protocol="application/pgp-signature"; boundary="g3RkK9jYN81zD2N+"
Content-Disposition: inline
In-Reply-To: <87y2l0b4ja.fsf@HIDDEN>
X-PGP-Key-ID: 0x41AAE7DCCA3D8351
X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc
X-PGP-Fingerprint: A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
X-Spam-Score: 3.6 (+++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  On Wed, Sep 23, 2020 at 10:51:21PM +0200, Ludovic Courtès
    wrote: > Hi! > > zimoun <zimon.toutoune@HIDDEN> skribis: > > > On Wed,
    23 Sep 2020 at 18:23, Ludovic Courtès <ludo@HIDDEN> wrote: > > > [...] 
 
 Content analysis details:   (3.6 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [31.210.181.177 listed in zen.spamhaus.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
X-Debbugs-Envelope-To: 43578
Cc: 43578 <at> debbugs.gnu.org, zimoun <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.6 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  On Wed, Sep 23, 2020 at 10:51:21PM +0200, Ludovic Courtès
    wrote: > Hi! > > zimoun <zimon.toutoune@HIDDEN> skribis: > > > On Wed,
    23 Sep 2020 at 18:23, Ludovic Courtès <ludo@HIDDEN> wrote: > > > [...] 
 
 Content analysis details:   (2.6 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [31.210.181.177 listed in zen.spamhaus.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager


--g3RkK9jYN81zD2N+
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Sep 23, 2020 at 10:51:21PM +0200, Ludovic Court=C3=A8s wrote:
> Hi!
>=20
> zimoun <zimon.toutoune@HIDDEN> skribis:
>=20
> > On Wed, 23 Sep 2020 at 18:23, Ludovic Court=C3=A8s <ludo@HIDDEN> wrote:
> >
> >> Concretely, the following commands had no effect thus far:
> >>
> >>   guix build python-itsdangerous --with-input=3Dpython=3Dpython2
> >>   guix build hello --with-input=3Dgcc=3Dgcc-toolchain@10
> >>
> >> In both cases, this is because the input we want to change is
> >> an implicit input.  This patch set fixes that, and it fixes
> >> <https://issues.guix.gnu.org/42156> as a side effect.
> >
> > Awesome!
> >
> > Therefore, 'package-with-explicit-python' & co. are becoming obsolete
> > (or almost), right?
>=20
> Good question, we=E2=80=99d have to check on a case-by-case basis.
> =E2=80=98package-input-rewriting=E2=80=99 is coarser-grain: it can potent=
ially rewrite
> =E2=80=98python=E2=80=99 dependencies deeper in the graph than
> =E2=80=98package-with-explicit-python=E2=80=99.
>=20

IIRC part of the reason for python-minimal was to build tcl/tk and xorg.
We don't really want to rebuild deep enough to rebuild xorg with
python2. I'm struggling to find a use-case but going as deep as sqlite
shouldn't be a problem.

> >> This opens new possibilities.  =E2=80=98--with-input=3Dpython=3Dpython=
2=E2=80=99 is one
> >> of them, but =E2=80=98--with-input=3Dgcc=3Dgcc-toolchain@10=E2=80=99 i=
s not (it fails
> >> to build for obscure reasons that I=E2=80=99ll fix in =E2=80=98core-up=
dates=E2=80=99, and
> >> it rebuilds the world anyway, which is not practical).  Another
> >
> > Rebuilding the world, maybe. :-)  It is interesting in the HPC context
> > where one would like use an "optimized" compiler, isn't?
>=20
> Like I wrote, =E2=80=98--with-input=3Dgcc=3Dgcc-toolchain@10=E2=80=99 (or=
 similar) isn=E2=80=99t
> practical: you=E2=80=99d have to rebuild the world.
>=20
> What I envision for the use case where you want to build a specific
> package set with a different toolchain is to have a
> =E2=80=98--with-toolchain=3DPACKAGE=3DTOOLCHAIN=E2=80=99 option.  That wo=
uld rebuild PACKAGE
> with TOOLCHAIN.  Then it would either rebuild all its dependents (as per
> =E2=80=98--with-input=E2=80=99) or graft the rebuilt package (as per =E2=
=80=98--with-graft=E2=80=99).
> The latter may not always be a viable option though, so I don=E2=80=99t k=
now.
>=20
> In fact I think it would be nice if the graft vs. rebuild choice could
> be made independently for all the transformation options.
>=20
> > Thank you.  I will give it a try for my use cases. :-)
>=20
> Awesome, let me know how it goes!
>=20
> Thank you,
> Ludo=E2=80=99.
>=20
>=20
>=20

--=20
Efraim Flashner   <efraim@HIDDEN>   =D7=90=D7=A4=D7=A8=D7=99=D7=9D =
=D7=A4=D7=9C=D7=A9=D7=A0=D7=A8
GPG key =3D A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

--g3RkK9jYN81zD2N+
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl9sPKQACgkQQarn3Mo9
g1Fu6xAAh7JtMVg1xzVgoU4pduR4SWbkO98gA7O/mIK4JhcU84vfKzX8eUFsMSMy
upMt+3j2JFLtlkRSGqSpk/aUdfXwUdVvqqSuwuv67K7l825aIbEwFlFmw9HX2whP
iUDtSTE4z6e/iV1XHr1WJbAICFB3LfJeFLJXQyn81b+7FTmjwTb17sS4Z5J8uVAd
mJlfbncEczSh1Yw5i4x/bjY6xms6W0jLTFYpWv2VMPThc6MrJUBhnY+35gEz7GBV
HPxjEHqaVegXlJ3F6ic2wYzWV2eqnmhxeLH3PG3EdiAQJ2LUEFVf5qB0BplZvy4D
HSrklHmtsNIvn5XEoeMwNWEIAoTUYoyKqMsEwM56tvqPkXUB+ye2XkjEZiX141jC
2oFb9HQHAZyVWMUy4epJ3hSzlfU9WXU+ey+nwmsSz5Lc2q4MXMxXIvfwP6JF+mhF
IjHELmInaK6IlVWjE2u4ZkO9fCgugqhbZe3wtU4lE8IhdskKiogumvRbgbTKx3Rr
nk1I86K62kDvuvudLTvSPtmXIC+LL12c1ivSx/UrIhZJTVaTBWaLqO6z5wTNcJOo
bzq2geSYoBDhWcv7O7e5cxircqOQKWTWaDaRkbJII5jMgLrnz0Au/JsMqQikVJW0
YgKgRWbxTjbeWitwFJm8NzDcS21GTC0rU94KGcuiyMOFj27szqA=
=/u5Q
-----END PGP SIGNATURE-----

--g3RkK9jYN81zD2N+--




Information forwarded to guix-patches@HIDDEN:
bug#43578; Package guix-patches. Full text available.

Message received at 43578 <at> debbugs.gnu.org:


Received: (at 43578) by debbugs.gnu.org; 23 Sep 2020 20:51:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 23 16:51:34 2020
Received: from localhost ([127.0.0.1]:38025 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kLBji-0002LB-9w
	for submit <at> debbugs.gnu.org; Wed, 23 Sep 2020 16:51:34 -0400
Received: from eggs.gnu.org ([209.51.188.92]:48104)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1kLBje-0002Kq-Sc
 for 43578 <at> debbugs.gnu.org; Wed, 23 Sep 2020 16:51:33 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:50458)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1kLBjY-00016e-Cr; Wed, 23 Sep 2020 16:51:25 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=53464 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1kLBjW-0003HV-Gd; Wed, 23 Sep 2020 16:51:24 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: zimoun <zimon.toutoune@HIDDEN>
Subject: Re: [bug#43578] [PATCH 0/4] Rewriting implicit inputs with
 'package-input-rewriting' & co.
References: <20200923161253.2378-1-ludo@HIDDEN>
 <CAJ3okZ1V-JAmgFGmWwRy+TRN5OiaD0zbmpjT2krfkCgn27f=9A@HIDDEN>
Date: Wed, 23 Sep 2020 22:51:21 +0200
In-Reply-To: <CAJ3okZ1V-JAmgFGmWwRy+TRN5OiaD0zbmpjT2krfkCgn27f=9A@HIDDEN>
 (zimoun's message of "Wed, 23 Sep 2020 19:17:33 +0200")
Message-ID: <87y2l0b4ja.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 43578
Cc: 43578 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi!

zimoun <zimon.toutoune@HIDDEN> skribis:

> On Wed, 23 Sep 2020 at 18:23, Ludovic Court=C3=A8s <ludo@HIDDEN> wrote:
>
>> Concretely, the following commands had no effect thus far:
>>
>>   guix build python-itsdangerous --with-input=3Dpython=3Dpython2
>>   guix build hello --with-input=3Dgcc=3Dgcc-toolchain@10
>>
>> In both cases, this is because the input we want to change is
>> an implicit input.  This patch set fixes that, and it fixes
>> <https://issues.guix.gnu.org/42156> as a side effect.
>
> Awesome!
>
> Therefore, 'package-with-explicit-python' & co. are becoming obsolete
> (or almost), right?

Good question, we=E2=80=99d have to check on a case-by-case basis.
=E2=80=98package-input-rewriting=E2=80=99 is coarser-grain: it can potentia=
lly rewrite
=E2=80=98python=E2=80=99 dependencies deeper in the graph than
=E2=80=98package-with-explicit-python=E2=80=99.

>> This opens new possibilities.  =E2=80=98--with-input=3Dpython=3Dpython2=
=E2=80=99 is one
>> of them, but =E2=80=98--with-input=3Dgcc=3Dgcc-toolchain@10=E2=80=99 is =
not (it fails
>> to build for obscure reasons that I=E2=80=99ll fix in =E2=80=98core-upda=
tes=E2=80=99, and
>> it rebuilds the world anyway, which is not practical).  Another
>
> Rebuilding the world, maybe. :-)  It is interesting in the HPC context
> where one would like use an "optimized" compiler, isn't?

Like I wrote, =E2=80=98--with-input=3Dgcc=3Dgcc-toolchain@10=E2=80=99 (or s=
imilar) isn=E2=80=99t
practical: you=E2=80=99d have to rebuild the world.

What I envision for the use case where you want to build a specific
package set with a different toolchain is to have a
=E2=80=98--with-toolchain=3DPACKAGE=3DTOOLCHAIN=E2=80=99 option.  That woul=
d rebuild PACKAGE
with TOOLCHAIN.  Then it would either rebuild all its dependents (as per
=E2=80=98--with-input=E2=80=99) or graft the rebuilt package (as per =E2=80=
=98--with-graft=E2=80=99).
The latter may not always be a viable option though, so I don=E2=80=99t kno=
w.

In fact I think it would be nice if the graft vs. rebuild choice could
be made independently for all the transformation options.

> Thank you.  I will give it a try for my use cases. :-)

Awesome, let me know how it goes!

Thank you,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#43578; Package guix-patches. Full text available.

Message received at 43578 <at> debbugs.gnu.org:


Received: (at 43578) by debbugs.gnu.org; 23 Sep 2020 17:17:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 23 13:17:52 2020
Received: from localhost ([127.0.0.1]:37706 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kL8Ou-0003S5-9x
	for submit <at> debbugs.gnu.org; Wed, 23 Sep 2020 13:17:52 -0400
Received: from mail-qt1-f195.google.com ([209.85.160.195]:36109)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1kL8Or-0003Rl-UK
 for 43578 <at> debbugs.gnu.org; Wed, 23 Sep 2020 13:17:50 -0400
Received: by mail-qt1-f195.google.com with SMTP id n10so542492qtv.3
 for <43578 <at> debbugs.gnu.org>; Wed, 23 Sep 2020 10:17:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc:content-transfer-encoding;
 bh=8OnZQLQdGGtc2dzQLLkrNkViI7xs0ZoaunFDMcIeeAw=;
 b=R+Y62V4BMJZHpuJM2Kw/Vo1ZircbREnQpnY+tsV64WaHkuOaSv8ys7i75ORAedC3KU
 CwUkqQ1VDrFLa9BQfsAt3ND6DckcIF4UWOghwSt+EqkU5PUU9VMQhm1QlbhTM8r3GvdO
 VXDFEBtz1ZufTEO1x+4OJ1+78j+TLJnA1naxcLjYQi4gDyqQE8Fl3IzvXNpiRN3nk5+A
 16DR6k48SqXU+KVDWoos7S/OPVPOBPGbabUT85UpB5EeV+6indmav6wX7HCU+tmO0Os9
 b7k7xseNZNciAafcjj2NTzoaHgMtKog+jUumEnSjTeFgpRJTwgXaxZkKES8u3xpdaHKE
 yDSA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc:content-transfer-encoding;
 bh=8OnZQLQdGGtc2dzQLLkrNkViI7xs0ZoaunFDMcIeeAw=;
 b=YQ8HkbnY6F4eykyUfhyjfDdjYkmj8wWT3orVv5bFCVUfRFdCdUxATQdSOUPW50oE7f
 DJKa7kfYvPag/UmPEx5mfni0R4/MP2o0RrP3ZZk/sJGpm/ckwszzbd5Cp6uZcnaxeqYM
 W+ydMNVe2o80yGTjEGcChsuLXD0JwS/YoTojneMtbA2kYrBdUhbfZ5p8NCGegkWE5PPF
 3CRlBR54N96pX8KoK6DiR8Y1EV7kjxQXWA4isncszImBSl2u8m+iG7wX24yw5BDOZMxq
 JHfB4hmIcYhUv8g42pRd1sc9dIqER/J+tMqiO+H4hyg3Vr1hgLHQkw8f/1zbIh9P1LlN
 csFQ==
X-Gm-Message-State: AOAM531Op1r1OZuTkdKxV7rB+6XApMoRmMqzFjq79369UPNErRXH6z/v
 LXcd9ZsPZs3xZRfm9XEmyASWeDmWCSfgKD+J9sY=
X-Google-Smtp-Source: ABdhPJyFC9Xx0kDsAPyX8eetKNDp9IFxU/2CcLh3lz+/X7cQduo1+KZkxLC4lpjTmYIPbbr07Tm476OF/6p5D4+fB2w=
X-Received: by 2002:ac8:fec:: with SMTP id f41mr1166117qtk.186.1600881464396; 
 Wed, 23 Sep 2020 10:17:44 -0700 (PDT)
MIME-Version: 1.0
References: <20200923161253.2378-1-ludo@HIDDEN>
In-Reply-To: <20200923161253.2378-1-ludo@HIDDEN>
From: zimoun <zimon.toutoune@HIDDEN>
Date: Wed, 23 Sep 2020 19:17:33 +0200
Message-ID: <CAJ3okZ1V-JAmgFGmWwRy+TRN5OiaD0zbmpjT2krfkCgn27f=9A@HIDDEN>
Subject: Re: [bug#43578] [PATCH 0/4] Rewriting implicit inputs with
 'package-input-rewriting' & co.
To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 43578
Cc: 43578 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi,

On Wed, 23 Sep 2020 at 18:23, Ludovic Court=C3=A8s <ludo@HIDDEN> wrote:

> Concretely, the following commands had no effect thus far:
>
>   guix build python-itsdangerous --with-input=3Dpython=3Dpython2
>   guix build hello --with-input=3Dgcc=3Dgcc-toolchain@10
>
> In both cases, this is because the input we want to change is
> an implicit input.  This patch set fixes that, and it fixes
> <https://issues.guix.gnu.org/42156> as a side effect.

Awesome!

Therefore, 'package-with-explicit-python' & co. are becoming obsolete
(or almost), right?


> This opens new possibilities.  =E2=80=98--with-input=3Dpython=3Dpython2=
=E2=80=99 is one
> of them, but =E2=80=98--with-input=3Dgcc=3Dgcc-toolchain@10=E2=80=99 is n=
ot (it fails
> to build for obscure reasons that I=E2=80=99ll fix in =E2=80=98core-updat=
es=E2=80=99, and
> it rebuilds the world anyway, which is not practical).  Another

Rebuilding the world, maybe. :-)  It is interesting in the HPC context
where one would like use an "optimized" compiler, isn't?


Thank you.  I will give it a try for my use cases. :-)

All the best,
simon




Information forwarded to guix-patches@HIDDEN:
bug#43578; Package guix-patches. Full text available.

Message received at 43578 <at> debbugs.gnu.org:


Received: (at 43578) by debbugs.gnu.org; 23 Sep 2020 16:23:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 23 12:23:37 2020
Received: from localhost ([127.0.0.1]:37624 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kL7YP-0001Xo-D2
	for submit <at> debbugs.gnu.org; Wed, 23 Sep 2020 12:23:37 -0400
Received: from eggs.gnu.org ([209.51.188.92]:44666)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1kL7YM-0001Wx-MV
 for 43578 <at> debbugs.gnu.org; Wed, 23 Sep 2020 12:23:35 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:47178)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1kL7YF-0000Jw-Vw; Wed, 23 Sep 2020 12:23:28 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52578 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1kL7YF-0002gP-1w; Wed, 23 Sep 2020 12:23:27 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 43578 <at> debbugs.gnu.org
Subject: [PATCH 3/4] packages: 'package-mapping' correctly recurses into
 'replacement'.
Date: Wed, 23 Sep 2020 18:23:17 +0200
Message-Id: <20200923162318.2800-3-ludo@HIDDEN>
X-Mailer: git-send-email 2.28.0
In-Reply-To: <20200923162318.2800-1-ludo@HIDDEN>
References: <20200923162318.2800-1-ludo@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 43578
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Previously, something like:

  guix build glib --with-graft=glibc=glibc@HIDDEN

would produce a result showing that rewriting rules were not applied to
libx11@HIDDEN (a replacement).

* guix/packages.scm (package-mapping): Call REPLACE instead of PROC to
'replacement'.
* tests/packages.scm ("package-input-rewriting/spec, graft"): New test.
---
 guix/packages.scm  |  2 +-
 tests/packages.scm | 27 +++++++++++++++++++++++++++
 2 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/guix/packages.scm b/guix/packages.scm
index f696945e30..0d0d7492b6 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -1037,7 +1037,7 @@ applied to implicit inputs as well."
               (inputs (map rewrite (package-inputs p)))
               (native-inputs (map rewrite (package-native-inputs p)))
               (propagated-inputs (map rewrite (package-propagated-inputs p)))
-              (replacement (and=> (package-replacement p) proc))
+              (replacement (and=> (package-replacement p) replace))
               (properties `((,mapping-property . #t)
                             ,@(package-properties p))))))))
 
diff --git a/tests/packages.scm b/tests/packages.scm
index 6fa4ad2f1b..e31dea6f72 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -1364,6 +1364,33 @@
     (match (delete-duplicates pythons eq?)
       ((p) (eq? p (rewrite python))))))
 
+(test-equal "package-input-rewriting/spec, graft"
+  (derivation-file-name (package-derivation %store sed))
+
+  ;; Make sure replacements are rewritten.
+  (let* ((dep0 (dummy-package "dep"
+                 (version "1")
+                 (build-system trivial-build-system)
+                 (inputs `(("coreutils" ,coreutils)))))
+         (dep1 (dummy-package "dep"
+                 (version "0")
+                 (build-system trivial-build-system)
+                 (replacement dep0)))
+         (p0   (dummy-package "p"
+                 (build-system trivial-build-system)
+                 (inputs `(("dep" ,dep1)))))
+         (rewrite (package-input-rewriting/spec
+                   `(("coreutils" . ,(const sed)))))
+         (p1      (rewrite p0)))
+    (match (package-inputs p1)
+      ((("dep" dep))
+       (match (package-inputs (package-replacement dep))
+         ((("coreutils" coreutils))
+          ;; COREUTILS is not 'eq?' to SED, so the most reliable way to check
+          ;; for equality is to lower to a derivation.
+          (derivation-file-name
+           (package-derivation %store coreutils))))))))
+
 (test-equal "package-patched-vulnerabilities"
   '(("CVE-2015-1234")
     ("CVE-2016-1234" "CVE-2018-4567")
-- 
2.28.0





Information forwarded to guix-patches@HIDDEN:
bug#43578; Package guix-patches. Full text available.

Message received at 43578 <at> debbugs.gnu.org:


Received: (at 43578) by debbugs.gnu.org; 23 Sep 2020 16:23:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 23 12:23:37 2020
Received: from localhost ([127.0.0.1]:37622 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kL7YO-0001Xh-UY
	for submit <at> debbugs.gnu.org; Wed, 23 Sep 2020 12:23:37 -0400
Received: from eggs.gnu.org ([209.51.188.92]:44662)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1kL7YM-0001Ww-Ls
 for 43578 <at> debbugs.gnu.org; Wed, 23 Sep 2020 12:23:35 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:47179)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1kL7YG-0000Jx-Of; Wed, 23 Sep 2020 12:23:29 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52578 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1kL7YG-0002gP-9w; Wed, 23 Sep 2020 12:23:28 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 43578 <at> debbugs.gnu.org
Subject: [PATCH 4/4] packages: 'package-input-rewriting' has a #:deep?
 parameter.
Date: Wed, 23 Sep 2020 18:23:18 +0200
Message-Id: <20200923162318.2800-4-ludo@HIDDEN>
X-Mailer: git-send-email 2.28.0
In-Reply-To: <20200923162318.2800-1-ludo@HIDDEN>
References: <20200923162318.2800-1-ludo@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 43578
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* guix/packages.scm (package-input-rewriting): Add #:deep? and pass it
to 'package-mapping'.
[replacement-property]: New variable.
[rewrite]: Check it.
[cut?]: New procedure.
* tests/packages.scm ("package-input-rewriting"): Pass #:deep? #f and
ensure implicit inputs were not rewritten.  Avoid 'eq?' comparisons.
("package-input-rewriting, deep"): New test.
* gnu/packages/guile.scm (package-for-guile-2.0, package-for-guile-3.0):
Pass #:deep? #f.
---
 doc/guix.texi          | 10 +++++-----
 gnu/packages/guile.scm |  6 ++++--
 guix/packages.scm      | 35 +++++++++++++++++++++++++----------
 tests/packages.scm     | 20 ++++++++++++++++++--
 4 files changed, 52 insertions(+), 19 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index e9e1d122ab..193529bbb1 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -6236,12 +6236,12 @@ transformation is @dfn{input rewriting}, whereby the dependency tree of
 a package is rewritten by replacing specific inputs by others:
 
 @deffn {Scheme Procedure} package-input-rewriting @var{replacements} @
-           [@var{rewrite-name}]
+           [@var{rewrite-name}] [#:deep? #t]
 Return a procedure that, when passed a package, replaces its direct and
-indirect dependencies (but not its implicit inputs) according to
-@var{replacements}.  @var{replacements} is a list of package pairs; the
-first element of each pair is the package to replace, and the second one
-is the replacement.
+indirect dependencies, including implicit inputs when @var{deep?} is
+true, according to @var{replacements}.  @var{replacements} is a list of
+package pairs; the first element of each pair is the package to replace,
+and the second one is the replacement.
 
 Optionally, @var{rewrite-name} is a one-argument procedure that takes
 the name of a package and returns its new name after rewrite.
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index c59daeebe2..280053bf06 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -420,11 +420,13 @@ GNU@tie{}Guile.  Use the @code{(ice-9 readline)} module and call its
   ;; A procedure that rewrites the dependency tree of the given package to use
   ;; GUILE-2.0 instead of GUILE-3.0.
   (package-input-rewriting `((,guile-3.0 . ,guile-2.0))
-                           (guile-variant-package-name "guile2.0")))
+                           (guile-variant-package-name "guile2.0")
+                           #:deep? #f))
 
 (define package-for-guile-2.2
   (package-input-rewriting `((,guile-3.0 . ,guile-2.2))
-                           (guile-variant-package-name "guile2.2")))
+                           (guile-variant-package-name "guile2.2")
+                           #:deep? #f))
 
 (define-syntax define-deprecated-guile3.0-package
   (lambda (s)
diff --git a/guix/packages.scm b/guix/packages.scm
index 0d0d7492b6..4f2bb432be 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -1044,22 +1044,37 @@ applied to implicit inputs as well."
   replace)
 
 (define* (package-input-rewriting replacements
-                                  #:optional (rewrite-name identity))
+                                  #:optional (rewrite-name identity)
+                                  #:key (deep? #t))
   "Return a procedure that, when passed a package, replaces its direct and
-indirect dependencies (but not its implicit inputs) according to REPLACEMENTS.
-REPLACEMENTS is a list of package pairs; the first element of each pair is the
-package to replace, and the second one is the replacement.
+indirect dependencies, including implicit inputs when DEEP? is true, according
+to REPLACEMENTS.  REPLACEMENTS is a list of package pairs; the first element
+of each pair is the package to replace, and the second one is the replacement.
 
 Optionally, REWRITE-NAME is a one-argument procedure that takes the name of a
 package and returns its new name after rewrite."
+  (define replacement-property
+    ;; Property to tag right-hand sides in REPLACEMENTS.
+    (gensym " package-replacement"))
+
   (define (rewrite p)
-    (match (assq-ref replacements p)
-      (#f  (package
-             (inherit p)
-             (name (rewrite-name (package-name p)))))
-      (new new)))
+    (if (assq-ref (package-properties p) replacement-property)
+        p
+        (match (assq-ref replacements p)
+          (#f  (package/inherit p
+                 (name (rewrite-name (package-name p)))))
+          (new (if deep?
+                   (package/inherit new
+                     (properties `((,replacement-property . #t)
+                                   ,@(package-properties new))))
+                   new)))))
 
-  (package-mapping rewrite (cut assq <> replacements)))
+  (define (cut? p)
+    (or (assq-ref (package-properties p) replacement-property)
+        (assq-ref replacements p)))
+
+  (package-mapping rewrite cut?
+                   #:deep? deep?))
 
 (define* (package-input-rewriting/spec replacements #:key (deep? #t))
   "Return a procedure that, given a package, applies the given REPLACEMENTS to
diff --git a/tests/packages.scm b/tests/packages.scm
index e31dea6f72..af8941c2e2 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -1239,7 +1239,8 @@
                               ("baz" ,dep)))))
          (rewrite (package-input-rewriting `((,coreutils . ,sed)
                                              (,grep . ,findutils))
-                                           (cut string-append "r-" <>)))
+                                           (cut string-append "r-" <>)
+                                           #:deep? #f))
          (p1      (rewrite p0))
          (p2      (rewrite p0)))
     (and (not (eq? p1 p0))
@@ -1253,7 +1254,22 @@
                  (eq? dep3 (rewrite dep))         ;memoization
                  (match (package-native-inputs dep3)
                    ((("x" dep))
-                    (eq? dep findutils)))))))))
+                    (eq? dep findutils))))))
+
+         ;; Make sure implicit inputs were left unchanged.
+         (equal? (drop (bag-direct-inputs (package->bag p1)) 3)
+                 (drop (bag-direct-inputs (package->bag p0)) 3)))))
+
+(test-eq "package-input-rewriting, deep"
+  (derivation-file-name (package-derivation %store sed))
+  (let* ((p0      (dummy-package "chbouib"
+                    (build-system python-build-system)
+                    (arguments `(#:python ,python))))
+         (rewrite (package-input-rewriting `((,python . ,sed))))
+         (p1      (rewrite p0)))
+    (match (bag-direct-inputs (package->bag p1))
+      ((("python" python) _ ...)
+       (derivation-file-name (package-derivation %store python))))))
 
 (test-assert "package-input-rewriting/spec"
   (let* ((dep     (dummy-package "chbouib"
-- 
2.28.0





Information forwarded to guix-patches@HIDDEN:
bug#43578; Package guix-patches. Full text available.

Message received at 43578 <at> debbugs.gnu.org:


Received: (at 43578) by debbugs.gnu.org; 23 Sep 2020 16:23:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 23 12:23:36 2020
Received: from localhost ([127.0.0.1]:37620 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kL7YO-0001Xe-9X
	for submit <at> debbugs.gnu.org; Wed, 23 Sep 2020 12:23:36 -0400
Received: from eggs.gnu.org ([209.51.188.92]:44658)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1kL7YK-0001Wt-9S
 for 43578 <at> debbugs.gnu.org; Wed, 23 Sep 2020 12:23:33 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:47177)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1kL7YE-0000Jp-Sc; Wed, 23 Sep 2020 12:23:26 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52578 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1kL7YD-0002gP-G2; Wed, 23 Sep 2020 12:23:26 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 43578 <at> debbugs.gnu.org
Subject: [PATCH 2/4] packages: 'package-input-rewriting/spec' can rewrite
 implicit dependencies.
Date: Wed, 23 Sep 2020 18:23:16 +0200
Message-Id: <20200923162318.2800-2-ludo@HIDDEN>
X-Mailer: git-send-email 2.28.0
In-Reply-To: <20200923162318.2800-1-ludo@HIDDEN>
References: <20200923162318.2800-1-ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 43578
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

With this change, '--with-input', '--with-graft', etc. also apply to
implicit dependencies.  Thus, it's now possible to do:

  guix build python-itsdangerous --with-input=python-wrapper=python@2

or:

  guix build hello --with-graft=glibc=glibc@HIDDEN

Additionally, before, implicit inputs were not rewritten, which could
lead to duplicates in the output of 'bag-transitive-inputs' (packages
that are not 'eq?' but lead to the same derivation).  This in turn would
lead to unnecessary rebuilds when using '--with-input' & co.  This
change fixes it by ensuring even implicit inputs are rewritten.

Fixes <https://bugs.gnu.org/42156>.

* guix/packages.scm (package-input-rewriting/spec): Add #:deep?
defaulting to #true, and pass it to 'package-mapping'.
[replacement-property]: New variable.
[rewrite]: Check that property and set it on the result of PROC.
[cut?]: New procedure.
* tests/packages.scm ("package-input-rewriting/spec"): Ensure implicit
inputs were unchanged.
("package-input-rewriting/spec, partial match"): Pass #:deep? #f.
("package-input-rewriting/spec, deep")
("package-input-rewriting/spec, no duplicates"): New tests.
(package/inherit): Move before use.
* tests/guix-build.sh: Add tests.
* tests/scripts-build.scm ("options->transformation, with-graft"):
Compare dependencies by package name or derivation file name.
* doc/guix.texi (Defining Packages): Adjust accordingly.
---
 doc/guix.texi           | 13 ++++----
 guix/packages.scm       | 53 +++++++++++++++++++++------------
 tests/guix-build.sh     | 11 +++++++
 tests/packages.scm      | 66 +++++++++++++++++++++++++++++++++++++++--
 tests/scripts-build.scm | 12 ++++++--
 5 files changed, 124 insertions(+), 31 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 4595008c4f..e9e1d122ab 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -6270,12 +6270,13 @@ This is exactly what the @option{--with-input} command-line option does
 The following variant of @code{package-input-rewriting} can match packages to
 be replaced by name rather than by identity.
 
-@deffn {Scheme Procedure} package-input-rewriting/spec @var{replacements}
-Return a procedure that, given a package, applies the given @var{replacements} to
-all the package graph (excluding implicit inputs).  @var{replacements} is a list of
-spec/procedures pair; each spec is a package specification such as @code{"gcc"} or
-@code{"guile@@2"}, and each procedure takes a matching package and returns a
-replacement for that package.
+@deffn {Scheme Procedure} package-input-rewriting/spec @var{replacements} [#:deep? #t]
+Return a procedure that, given a package, applies the given
+@var{replacements} to all the package graph, including implicit inputs
+unless @var{deep?} is false.  @var{replacements} is a list of
+spec/procedures pair; each spec is a package specification such as
+@code{"gcc"} or @code{"guile@@2"}, and each procedure takes a matching
+package and returns a replacement for that package.
 @end deffn
 
 The example above could be rewritten this way:
diff --git a/guix/packages.scm b/guix/packages.scm
index 171fd048ef..f696945e30 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -422,6 +422,16 @@ name of its URI."
                                                        package)
                                                       16)))))
 
+(define-syntax-rule (package/inherit p overrides ...)
+  "Like (package (inherit P) OVERRIDES ...), except that the same
+transformation is done to the package replacement, if any.  P must be a bare
+identifier, and will be bound to either P or its replacement when evaluating
+OVERRIDES."
+  (let loop ((p p))
+    (package (inherit p)
+      overrides ...
+      (replacement (and=> (package-replacement p) loop)))))
+
 (define (package-upstream-name package)
   "Return the upstream name of PACKAGE, which could be different from the name
 it has in Guix."
@@ -1051,12 +1061,12 @@ package and returns its new name after rewrite."
 
   (package-mapping rewrite (cut assq <> replacements)))
 
-(define (package-input-rewriting/spec replacements)
+(define* (package-input-rewriting/spec replacements #:key (deep? #t))
   "Return a procedure that, given a package, applies the given REPLACEMENTS to
-all the package graph (excluding implicit inputs).  REPLACEMENTS is a list of
-spec/procedures pair; each spec is a package specification such as \"gcc\" or
-\"guile@2\", and each procedure takes a matching package and returns a
-replacement for that package."
+all the package graph, including implicit inputs unless DEEP? is false.
+REPLACEMENTS is a list of spec/procedures pair; each spec is a package
+specification such as \"gcc\" or \"guile@2\", and each procedure takes a
+matching package and returns a replacement for that package."
   (define table
     (fold (lambda (replacement table)
             (match replacement
@@ -1081,22 +1091,27 @@ replacement for that package."
                  (package-name package)
                  table))
 
-  (define (rewrite package)
-    (match (find-replacement package)
-      (#f package)
-      (proc (proc package))))
+  (define replacement-property
+    (gensym " package-replacement"))
 
-  (package-mapping rewrite find-replacement))
+  (define (rewrite p)
+    (if (assq-ref (package-properties p) replacement-property)
+        p
+        (match (find-replacement p)
+          (#f p)
+          (proc
+           (let ((new (proc p)))
+             ;; Mark NEW as already processed.
+             (package/inherit new
+               (properties `((,replacement-property . #t)
+                             ,@(package-properties new)))))))))
 
-(define-syntax-rule (package/inherit p overrides ...)
-  "Like (package (inherit P) OVERRIDES ...), except that the same
-transformation is done to the package replacement, if any.  P must be a bare
-identifier, and will be bound to either P or its replacement when evaluating
-OVERRIDES."
-  (let loop ((p p))
-    (package (inherit p)
-      overrides ...
-      (replacement (and=> (package-replacement p) loop)))))
+  (define (cut? p)
+    (or (assq-ref (package-properties p) replacement-property)
+        (find-replacement p)))
+
+  (package-mapping rewrite cut?
+                   #:deep? deep?))
 
 
 ;;;
diff --git a/tests/guix-build.sh b/tests/guix-build.sh
index 6c08857358..ec2f736ccb 100644
--- a/tests/guix-build.sh
+++ b/tests/guix-build.sh
@@ -259,6 +259,17 @@ drv1=`guix build guile -d`
 drv2=`guix build guile --with-input=gimp=ruby -d`
 test "$drv1" = "$drv2"
 
+# See <https://bugs.gnu.org/42156>.
+drv1=`guix build glib -d`
+drv2=`guix build glib -d --with-input=libreoffice=inkscape`
+test "$drv1" = "$drv2"
+
+# Rewriting implicit inputs.
+drv1=`guix build hello -d`
+drv2=`guix build hello -d --with-input=gcc=gcc-toolchain`
+test "$drv1" != "$drv2"
+guix gc -R "$drv2" | grep `guix build -d gcc-toolchain`
+
 if guix build guile --with-input=libunistring=something-really-silly
 then false; else true; fi
 
diff --git a/tests/packages.scm b/tests/packages.scm
index f33332a461..6fa4ad2f1b 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -38,6 +38,7 @@
   #:use-module (guix build-system)
   #:use-module (guix build-system trivial)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system python)
   #:use-module (guix memoization)
   #:use-module (guix profiles)
   #:use-module (guix scripts package)
@@ -45,6 +46,7 @@
   #:use-module (gnu packages base)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages bootstrap)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages xml)
   #:use-module (srfi srfi-1)
@@ -1262,7 +1264,8 @@
                               ("baz" ,dep)))))
          (rewrite (package-input-rewriting/spec
                    `(("coreutils" . ,(const sed))
-                     ("grep" . ,(const findutils)))))
+                     ("grep" . ,(const findutils)))
+                   #:deep? #f))
          (p1      (rewrite p0))
          (p2      (rewrite p0)))
     (and (not (eq? p1 p0))
@@ -1279,7 +1282,11 @@
                  (match (package-native-inputs dep3)
                    ((("x" dep))
                     (string=? (package-full-name dep)
-                              (package-full-name findutils))))))))))
+                              (package-full-name findutils)))))))
+
+         ;; Make sure implicit inputs were left unchanged.
+         (equal? (drop (bag-direct-inputs (package->bag p1)) 3)
+                 (drop (bag-direct-inputs (package->bag p0)) 3)))))
 
 (test-assert "package-input-rewriting/spec, partial match"
   (let* ((dep     (dummy-package "chbouib"
@@ -1290,7 +1297,8 @@
                               ("bar" ,dep)))))
          (rewrite (package-input-rewriting/spec
                    `(("chbouib@123" . ,(const sed)) ;not matched
-                     ("grep" . ,(const findutils)))))
+                     ("grep" . ,(const findutils)))
+                   #:deep? #f))
          (p1      (rewrite p0)))
     (and (not (eq? p1 p0))
          (string=? "example" (package-name p1))
@@ -1304,6 +1312,58 @@
                     (string=? (package-full-name dep)
                               (package-full-name findutils))))))))))
 
+(test-assert "package-input-rewriting/spec, deep"
+  (let* ((dep     (dummy-package "chbouib"))
+         (p0      (dummy-package "example"
+                    (build-system gnu-build-system)
+                    (inputs `(("dep" ,dep)))))
+         (rewrite (package-input-rewriting/spec
+                   `(("tar"  . ,(const sed))
+                     ("gzip" . ,(const findutils)))))
+         (p1      (rewrite p0))
+         (p2      (rewrite p0)))
+    (and (not (eq? p1 p0))
+         (eq? p1 p2)                              ;memoization
+         (string=? "example" (package-name p1))
+         (match (package-inputs p1)
+           ((("dep" dep1))
+            (and (string=? (package-full-name dep1)
+                           (package-full-name dep))
+                 (eq? dep1 (rewrite dep)))))      ;memoization
+
+         ;; Make sure implicit inputs were replaced.
+         (match (bag-direct-inputs (package->bag p1))
+           ((("dep" dep1) ("tar" tar) ("gzip" gzip) _ ...)
+            (and (eq? dep1 (rewrite dep))
+                 (string=? (package-full-name tar)
+                           (package-full-name sed))
+                 (string=? (package-full-name gzip)
+                           (package-full-name findutils))))))))
+
+(test-assert "package-input-rewriting/spec, no duplicates"
+  ;; Ensure that deep input rewriting does not forget implicit inputs.  Doing
+  ;; so could lead to duplicates in a package's inputs: in the example below,
+  ;; P0's transitive inputs would contain one rewritten "python" and one
+  ;; original "python".  These two "python" packages are thus not 'eq?' but
+  ;; they lower to the same derivation.  See <https://bugs.gnu.org/42156>,
+  ;; which can be reproduced by passing #:deep? #f.
+  (let* ((dep0    (dummy-package "dep0"
+                    (build-system trivial-build-system)
+                    (propagated-inputs `(("python" ,python)))))
+         (p0      (dummy-package "chbouib"
+                    (build-system python-build-system)
+                    (arguments `(#:python ,python))
+                    (inputs `(("dep0" ,dep0)))))
+         (rewrite (package-input-rewriting/spec '() #:deep? #t))
+         (p1      (rewrite p0))
+         (bag1    (package->bag p1))
+         (pythons (filter-map (match-lambda
+                                (("python" python) python)
+                                (_ #f))
+                              (bag-transitive-inputs bag1))))
+    (match (delete-duplicates pythons eq?)
+      ((p) (eq? p (rewrite python))))))
+
 (test-equal "package-patched-vulnerabilities"
   '(("CVE-2015-1234")
     ("CVE-2016-1234" "CVE-2018-4567")
diff --git a/tests/scripts-build.scm b/tests/scripts-build.scm
index 32876e956a..3491610754 100644
--- a/tests/scripts-build.scm
+++ b/tests/scripts-build.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016, 2017, 2019 Ludovic Courtès <ludo@HIDDEN>
+;;; Copyright © 2016, 2017, 2019, 2020 Ludovic Courtès <ludo@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -19,6 +19,7 @@
 (define-module (test-scripts-build)
   #:use-module (guix tests)
   #:use-module (guix store)
+  #:use-module (guix derivations)
   #:use-module (guix packages)
   #:use-module (guix git-download)
   #:use-module (guix scripts build)
@@ -163,11 +164,16 @@
                ((("foo" dep1) ("bar" dep2))
                 (and (string=? (package-full-name dep1)
                                (package-full-name grep))
-                     (eq? (package-replacement dep1) findutils)
+                     (string=? (package-full-name (package-replacement dep1))
+                               (package-full-name findutils))
                      (string=? (package-name dep2) "chbouib")
                      (match (package-native-inputs dep2)
                        ((("x" dep))
-                        (eq? (package-replacement dep) findutils)))))))))))
+                        (with-store store
+                          (string=? (derivation-file-name
+                                     (package-derivation store findutils))
+                                    (derivation-file-name
+                                     (package-derivation store dep))))))))))))))
 
 (test-equal "options->transformation, with-branch"
   (git-checkout (url "https://example.org")
-- 
2.28.0





Information forwarded to guix-patches@HIDDEN:
bug#43578; Package guix-patches. Full text available.

Message received at 43578 <at> debbugs.gnu.org:


Received: (at 43578) by debbugs.gnu.org; 23 Sep 2020 16:23:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 23 12:23:33 2020
Received: from localhost ([127.0.0.1]:37616 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kL7YK-0001XD-Lt
	for submit <at> debbugs.gnu.org; Wed, 23 Sep 2020 12:23:33 -0400
Received: from eggs.gnu.org ([209.51.188.92]:44652)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1kL7YI-0001Wq-Qs
 for 43578 <at> debbugs.gnu.org; Wed, 23 Sep 2020 12:23:31 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:47175)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1kL7YD-0000Is-Cx; Wed, 23 Sep 2020 12:23:25 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52578 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1kL7YB-0002gP-NW; Wed, 23 Sep 2020 12:23:24 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 43578 <at> debbugs.gnu.org
Subject: [PATCH 1/4] packages: 'package-mapping' can recurse on implicit
 inputs.
Date: Wed, 23 Sep 2020 18:23:15 +0200
Message-Id: <20200923162318.2800-1-ludo@HIDDEN>
X-Mailer: git-send-email 2.28.0
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 43578
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* guix/packages.scm (build-system-with-package-mapping): New procedure.
(package-mapping): Add #:deep? and honor it.
* tests/packages.scm ("package-mapping"): Compare the direct inputs of
the bag of P0 and that of P1.
("package-mapping, deep"): New test.
---
 doc/guix.texi      |  5 ++--
 guix/packages.scm  | 65 +++++++++++++++++++++++++++++++++++-----------
 tests/packages.scm | 36 ++++++++++++++++++++++++-
 3 files changed, 88 insertions(+), 18 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index f7e2204b53..4595008c4f 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -6294,10 +6294,11 @@ A more generic procedure to rewrite a package dependency graph is
 @code{package-mapping}: it supports arbitrary changes to nodes in the
 graph.
 
-@deffn {Scheme Procedure} package-mapping @var{proc} [@var{cut?}]
+@deffn {Scheme Procedure} package-mapping @var{proc} [@var{cut?}] [#:deep? #f]
 Return a procedure that, given a package, applies @var{proc} to all the packages
 depended on and returns the resulting package.  The procedure stops recursion
-when @var{cut?} returns true for a given package.
+when @var{cut?} returns true for a given package.  When @var{deep?} is true, @var{proc} is
+applied to implicit inputs as well.
 @end deffn
 
 @menu
diff --git a/guix/packages.scm b/guix/packages.scm
index 6598bd3149..171fd048ef 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -968,10 +968,31 @@ packages they depend on, recursively."
                    (vhash-consq package #t visited)
                    (fold set-insert closure dependencies))))))))
 
-(define* (package-mapping proc #:optional (cut? (const #f)))
+(define (build-system-with-package-mapping bs rewrite)
+  "Return a variant of BS, a build system, that rewrites a bag's inputs by
+passing them through REWRITE, a procedure that takes an input tuplet and
+returns a \"rewritten\" input tuplet."
+  (define lower
+    (build-system-lower bs))
+
+  (define (lower* . args)
+    (let ((lowered (apply lower args)))
+      (bag
+        (inherit lowered)
+        (build-inputs (map rewrite (bag-build-inputs lowered)))
+        (host-inputs (map rewrite (bag-host-inputs lowered)))
+        (target-inputs (map rewrite (bag-target-inputs lowered))))))
+
+  (build-system
+    (inherit bs)
+    (lower lower*)))
+
+(define* (package-mapping proc #:optional (cut? (const #f))
+                          #:key deep?)
   "Return a procedure that, given a package, applies PROC to all the packages
 depended on and returns the resulting package.  The procedure stops recursion
-when CUT? returns true for a given package."
+when CUT? returns true for a given package.  When DEEP? is true, PROC is
+applied to implicit inputs as well."
   (define (rewrite input)
     (match input
       ((label (? package? package) outputs ...)
@@ -980,21 +1001,35 @@ when CUT? returns true for a given package."
       (_
        input)))
 
+  (define mapping-property
+    ;; Property indicating whether the package has already been processed.
+    (gensym " package-mapping-done"))
+
   (define replace
     (mlambdaq (p)
-      ;; Return a variant of P with PROC applied to P and its explicit
-      ;; dependencies, recursively.  Memoize the transformations.  Failing to
-      ;; do that, we would build a huge object graph with lots of duplicates,
-      ;; which in turns prevents us from benefiting from memoization in
-      ;; 'package-derivation'.
-      (let ((p (proc p)))
-        (package
-          (inherit p)
-          (location (package-location p))
-          (inputs (map rewrite (package-inputs p)))
-          (native-inputs (map rewrite (package-native-inputs p)))
-          (propagated-inputs (map rewrite (package-propagated-inputs p)))
-          (replacement (and=> (package-replacement p) proc))))))
+      ;; If P is the result of a previous call, return it.
+      (if (assq-ref (package-properties p) mapping-property)
+          p
+
+          ;; Return a variant of P with PROC applied to P and its explicit
+          ;; dependencies, recursively.  Memoize the transformations.  Failing
+          ;; to do that, we would build a huge object graph with lots of
+          ;; duplicates, which in turns prevents us from benefiting from
+          ;; memoization in 'package-derivation'.
+          (let ((p (proc p)))
+            (package
+              (inherit p)
+              (location (package-location p))
+              (build-system (if deep?
+                                (build-system-with-package-mapping
+                                 (package-build-system p) rewrite)
+                                (package-build-system p)))
+              (inputs (map rewrite (package-inputs p)))
+              (native-inputs (map rewrite (package-native-inputs p)))
+              (propagated-inputs (map rewrite (package-propagated-inputs p)))
+              (replacement (and=> (package-replacement p) proc))
+              (properties `((,mapping-property . #t)
+                            ,@(package-properties p))))))))
 
   replace)
 
diff --git a/tests/packages.scm b/tests/packages.scm
index cbd0503733..f33332a461 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -1172,15 +1172,24 @@
   (let* ((dep       (dummy-package "chbouib"
                       (native-inputs `(("x" ,grep)))))
          (p0        (dummy-package "example"
+                      (source 77)
                       (inputs `(("foo" ,coreutils)
                                 ("bar" ,grep)
                                 ("baz" ,dep)))))
          (transform (lambda (p)
                       (package (inherit p) (source 42))))
          (rewrite   (package-mapping transform))
-         (p1        (rewrite p0)))
+         (p1        (rewrite p0))
+         (bag0      (package->bag p0))
+         (bag1      (package->bag p1)))
     (and (eq? p1 (rewrite p0))
          (eqv? 42 (package-source p1))
+
+         ;; Implicit inputs should be left unchanged (skip "source", "foo",
+         ;; "bar", and "baz" in this comparison).
+         (equal? (drop (bag-direct-inputs bag0) 4)
+                 (drop (bag-direct-inputs bag1) 4))
+
          (match (package-inputs p1)
            ((("foo" dep1) ("bar" dep2) ("baz" dep3))
             (and (eq? dep1 (rewrite coreutils))   ;memoization
@@ -1194,6 +1203,31 @@
                     (and (eq? dep (rewrite grep))
                          (package-source dep))))))))))
 
+(test-equal "package-mapping, deep"
+  '(42)
+  (let* ((p0        (dummy-package "example"
+                      (inputs `(("foo" ,coreutils)
+                                ("bar" ,grep)))))
+         (transform (lambda (p)
+                      (package (inherit p) (source 42))))
+         (rewrite   (package-mapping transform #:deep? #t))
+         (p1        (rewrite p0))
+         (bag       (package->bag p1)))
+    (and (eq? p1 (rewrite p0))
+         (match (bag-direct-inputs bag)
+           ((("source" 42) ("foo" dep1) ("bar" dep2) rest ..1)
+            (and (eq? dep1 (rewrite coreutils))   ;memoization
+                 (eq? dep2 (rewrite grep))
+                 (= 42 (package-source dep1))
+                 (= 42 (package-source dep2))
+
+                 ;; Check that implicit inputs of P0 also got rewritten.
+                 (delete-duplicates
+                  (map (match-lambda
+                         ((_ package . _)
+                          (package-source package)))
+                       rest))))))))
+
 (test-assert "package-input-rewriting"
   (let* ((dep     (dummy-package "chbouib"
                     (native-inputs `(("x" ,grep)))))
-- 
2.28.0





Information forwarded to guix-patches@HIDDEN:
bug#43578; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Sep 2020 16:13:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 23 12:13:06 2020
Received: from localhost ([127.0.0.1]:37595 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kL7OE-00019x-EY
	for submit <at> debbugs.gnu.org; Wed, 23 Sep 2020 12:13:06 -0400
Received: from lists.gnu.org ([209.51.188.17]:44644)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1kL7O9-00019j-OP
 for submit <at> debbugs.gnu.org; Wed, 23 Sep 2020 12:13:04 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:47774)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1kL7O9-0005rp-Gj
 for guix-patches@HIDDEN; Wed, 23 Sep 2020 12:13:01 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:46893)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1kL7O8-0006j5-Fn; Wed, 23 Sep 2020 12:13:00 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52508 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1kL7O7-0001pK-L4; Wed, 23 Sep 2020 12:13:00 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 0/4] Rewriting implicit inputs with 'package-input-rewriting'
 & co.
Date: Wed, 23 Sep 2020 18:12:53 +0200
Message-Id: <20200923161253.2378-1-ludo@HIDDEN>
X-Mailer: git-send-email 2.28.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hello Guix!

This patch set aims to hit two bird hunters with one stone:
initially my goal was to fix <https://issues.guix.gnu.org/42156>,
which has become a hindrance to the use of package transformation
options, but it also ends up addressing the fact that those
options did not, until now, rewrite implicit dependencies.

Concretely, the following commands had no effect thus far:

  guix build python-itsdangerous --with-input=python=python2
  guix build hello --with-input=gcc=gcc-toolchain@10

In both cases, this is because the input we want to change is
an implicit input.  This patch set fixes that, and it fixes
<https://issues.guix.gnu.org/42156> as a side effect.

This opens new possibilities.  ‘--with-input=python=python2’ is one
of them, but ‘--with-input=gcc=gcc-toolchain@10’ is not (it fails
to build for obscure reasons that I’ll fix in ‘core-updates’, and
it rebuilds the world anyway, which is not practical).  Another
thing that I find interesting is:

  $ guix build hello --with-graft=glibc=glibc@HIDDEN
  /gnu/store/6jv7icpjbl3pvj24db2q2fmdly9vgp4d-hello-2.10
  $ /gnu/store/6jv7icpjbl3pvj24db2q2fmdly9vgp4d-hello-2.10/bin/hello 
  Saluton, mondo!
  $ LD_TRACE_LOADED_OBJECTS=yes /gnu/store/6jv7icpjbl3pvj24db2q2fmdly9vgp4d-hello-2.10/bin/hello
          linux-vdso.so.1 (0x00007ffcc87f8000)
          libgcc_s.so.1 => /gnu/store/1sqr5fa6jbksqmi7hibqaffixy3b1j0y-gcc-7.5.0-lib/lib/libgcc_s.so.1 (0x00007f3f36c3c000)
          libc.so.6 => /gnu/store/i4iqkjx34r3nmwwblfmkbsbsd3pgapfp-glibc-2.29/lib/libc.so.6 (0x00007f3f36a82000)
          /gnu/store/i4iqkjx34r3nmwwblfmkbsbsd3pgapfp-glibc-2.29/lib/ld-linux-x86-64.so.2 (0x00007f3f36c57000)

It “relinks” the package against a different libc, assuming the
ABI is compatible (this particular example downgrades glibc, probably
less useful in the real world than upgrading; it works for ‘hello’
but not for ‘inkscape’ due to ABI differences.)

Feedback welcome!

Ludo’.

Ludovic Courtès (4):
  packages: 'package-mapping' can recurse on implicit inputs.
  packages: 'package-input-rewriting/spec' can rewrite implicit
    dependencies.
  packages: 'package-mapping' correctly recurses into 'replacement'.
  packages: 'package-input-rewriting' has a #:deep? parameter.

 doc/guix.texi           |  28 ++++----
 gnu/packages/guile.scm  |   6 +-
 guix/packages.scm       | 153 ++++++++++++++++++++++++++++------------
 tests/guix-build.sh     |  11 +++
 tests/packages.scm      | 149 ++++++++++++++++++++++++++++++++++++--
 tests/scripts-build.scm |  12 +++-
 6 files changed, 291 insertions(+), 68 deletions(-)

-- 
2.28.0





Acknowledgement sent to Ludovic Courtès <ludo@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#43578; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 5 Oct 2020 08:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.