bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19816: 'guix environment' always downloads all the outputs of depend


From: Ludovic Courtès
Subject: bug#19816: 'guix environment' always downloads all the outputs of dependencies
Date: Fri, 12 Feb 2016 22:07:31 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

"Thompson, David" <address@hidden> skribis:

> On Sun, Dec 20, 2015 at 5:34 PM, Ludovic Courtès <address@hidden> wrote:
>> address@hidden (Ludovic Courtès) skribis:
>>
>>>>>From <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19641#16>:
>>>
>>> There’s another problem, though.  When a dependency is a multiple-output
>>> package, all its outputs are added to the environment, because
>>> ‘package->transitive-inputs’ discards the information of which output is
>>> needed.
>>>
>>> So for instance, both the ‘out’ and the ‘debug’ output of Coreutils end
>>> up being downloaded and added to the environment, even though only ‘out’
>>> is an input.
>>>
>>> Now, the problem is that ‘build-derivations’ can only build *all* the
>>> outputs of the given derivation.  This could be worked around either:
>>>
>>>   1. by creating a “sink” derivation, for instance with
>>>      ‘profile-derivation’, 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’d like to post?
>>
>> I understand you may be busy preparing the Lisp Game Jam now and I
>> wouldn’t want to distract you from that.  ;-)  If you have something to
>> share, I’m happy to help start from there though (says the guy who sees
>> its ‘guix environment’ pointlessly downloading “debug” and “doc” 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’ve finally finished it and pushed as 779aa00.

I took a different strategy for the tests, which is to rely (in part) on
the output of ‘guix gc --references’ to determine whether the profile
contains all we need.

Thanks,
Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]