From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#19816: 'guix environment' always downloads all the outputs of dependencies Date: Fri, 12 Feb 2016 22:07:31 +0100 Message-ID: <87pow1zlgs.fsf@gnu.org> References: <87a90op8gq.fsf@gnu.org> <87zix4rbp3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38578) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUKwg-0002t7-MX for bug-guix@gnu.org; Fri, 12 Feb 2016 16:08:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUKwc-0004Sq-Jg for bug-guix@gnu.org; Fri, 12 Feb 2016 16:08:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:57375) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUKwc-0004Sh-Fy for bug-guix@gnu.org; Fri, 12 Feb 2016 16:08:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aUKwc-00078u-Bh for bug-guix@gnu.org; Fri, 12 Feb 2016 16:08:02 -0500 Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Message-ID: In-Reply-To: (David Thompson's message of "Mon, 21 Dec 2015 12:21:38 -0500") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: "Thompson, David" Cc: 19816-done@debbugs.gnu.org, Dave Thompson "Thompson, David" skribis: > On Sun, Dec 20, 2015 at 5:34 PM, Ludovic Court=C3=A8s wrot= e: >> ludo@gnu.org (Ludovic Court=C3=A8s) skribis: >> >>>>>From : >>> >>> There=E2=80=99s another problem, though. When a dependency is a multip= le-output >>> package, all its outputs are added to the environment, because >>> =E2=80=98package->transitive-inputs=E2=80=99 discards the information o= f which output is >>> needed. >>> >>> So for instance, both the =E2=80=98out=E2=80=99 and the =E2=80=98debug= =E2=80=99 output of Coreutils end >>> up being downloaded and added to the environment, even though only =E2= =80=98out=E2=80=99 >>> is an input. >>> >>> Now, the problem is that =E2=80=98build-derivations=E2=80=99 can only b= uild *all* the >>> outputs of the given derivation. This could be worked around either: >>> >>> 1. by creating a =E2=80=9Csink=E2=80=9D derivation, for instance with >>> =E2=80=98profile-derivation=E2=80=99, that could refer precisely t= o the output(s) >>> needed; not ideal. >> >> David, I think you had started looking at doing exactly this. Do you >> have a preliminary patch you=E2=80=99d like to post? >> >> I understand you may be busy preparing the Lisp Game Jam now and I >> wouldn=E2=80=99t want to distract you from that. ;-) If you have somet= hing to >> share, I=E2=80=99m happy to help start from there though (says the guy w= ho sees >> its =E2=80=98guix environment=E2=80=99 pointlessly downloading =E2=80=9C= debug=E2=80=9D and =E2=80=9Cdoc=E2=80=9D outputs >> again.) > > The wip-environment-profiles branch has the code I've written thus > far. I rebased it on master and resolved some conflicts in hopefully > the right way. :) > > When I last hacked on it I got into a fully working state AFAICT, but > the tests needed updating and that proved to be the most challenging > part. If you're willing to finish it up, that would be awesome! It took me a while but I=E2=80=99ve finally finished it and pushed as 779aa= 00. I took a different strategy for the tests, which is to rely (in part) on the output of =E2=80=98guix gc --references=E2=80=99 to determine whether t= he profile contains all we need. Thanks, Ludo=E2=80=99.