From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thompson, David" Subject: bug#19816: 'guix environment' always downloads all the outputs of dependencies Date: Mon, 21 Dec 2015 12:21:38 -0500 Message-ID: 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]:54656) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aB49t-000278-UA for bug-guix@gnu.org; Mon, 21 Dec 2015 12:22:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aB49q-0001MN-My for bug-guix@gnu.org; Mon, 21 Dec 2015 12:22:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:51454) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aB49q-0001MJ-KM for bug-guix@gnu.org; Mon, 21 Dec 2015 12:22:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aB49q-0003wT-Gd for bug-guix@gnu.org; Mon, 21 Dec 2015 12:22:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87zix4rbp3.fsf@gnu.org> 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 19816@debbugs.gnu.org, Dave Thompson On Sun, Dec 20, 2015 at 5:34 PM, Ludovic Court=C3=A8s wrote: > ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > >>>From : >> >> There=E2=80=99s another problem, though. When a dependency is a multipl= e-output >> package, all its outputs are added to the environment, because >> =E2=80=98package->transitive-inputs=E2=80=99 discards the information of= 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 bu= ild *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 to= 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 someth= ing to > share, I=E2=80=99m happy to help start from there though (says the guy wh= o sees > its =E2=80=98guix environment=E2=80=99 pointlessly downloading =E2=80=9Cd= ebug=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! Thanks, - Dave