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: Fri, 12 Feb 2016 16:37:38 -0500 Message-ID: References: <87a90op8gq.fsf@gnu.org> <87zix4rbp3.fsf@gnu.org> <87pow1zlgs.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]:56396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aULPi-0002DF-0c for bug-guix@gnu.org; Fri, 12 Feb 2016 16:38:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aULPd-0004Zw-TS for bug-guix@gnu.org; Fri, 12 Feb 2016 16:38:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:57405) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aULPd-0004Zn-Qo for bug-guix@gnu.org; Fri, 12 Feb 2016 16:38:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aULPd-0007qr-Hw for bug-guix@gnu.org; Fri, 12 Feb 2016 16:38:01 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87pow1zlgs.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-done@debbugs.gnu.org, Dave Thompson On Fri, Feb 12, 2016 at 4:07 PM, Ludovic Court=C3=A8s wrote: > "Thompson, David" skribis: > >> On Sun, Dec 20, 2015 at 5:34 PM, Ludovic Court=C3=A8s wro= te: >>> ludo@gnu.org (Ludovic Court=C3=A8s) skribis: >>> >>>>>>From : >>>> >>>> There=E2=80=99s another problem, though. When a dependency is a multi= ple-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 = build *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 wit= h >>>> =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 some= thing to >>> share, I=E2=80=99m happy to help start from there though (says the guy = who sees >>> its =E2=80=98guix environment=E2=80=99 pointlessly downloading =E2=80= =9Cdebug=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 779= aa00. > > 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= the profile > contains all we need. Thank you! I'm excited that this is finally in master. - Dave