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: Sun, 08 Feb 2015 19:24:37 +0100 Message-ID: <87a90op8gq.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]:54620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKWXb-0006FC-Rm for bug-guix@gnu.org; Sun, 08 Feb 2015 13:25:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YKWXW-0006aH-TP for bug-guix@gnu.org; Sun, 08 Feb 2015 13:25:07 -0500 Received: from debbugs.gnu.org ([140.186.70.43]:46320) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKWXW-0006aD-RA for bug-guix@gnu.org; Sun, 08 Feb 2015 13:25:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YKWXW-00057I-Kw for bug-guix@gnu.org; Sun, 08 Feb 2015 13:25:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54568) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKWXE-0006Bh-TD for bug-guix@gnu.org; Sun, 08 Feb 2015 13:24:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YKWX9-0006P9-UJ for bug-guix@gnu.org; Sun, 08 Feb 2015 13:24:44 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36429) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKWX9-0006P5-RX for bug-guix@gnu.org; Sun, 08 Feb 2015 13:24:39 -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: 19816@debbugs.gnu.org Cc: Dave Thompson >From : There=E2=80=99s another problem, though. When a dependency is a multiple-o= utput package, all its outputs are added to the environment, because =E2=80=98package->transitive-inputs=E2=80=99 discards the information of wh= ich 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 with =E2=80=98profile-derivation=E2=80=99, that could refer precisely to th= e output(s) needed; not ideal. 2. by using (build-things (list "/the/output/path")) and resorting to =E2=80=98build-derivations=E2=80=99 only if the =E2=80=98build-things= =E2=80=99 call did nothing (when passed a non-.drv store item, =E2=80=98build-things=E2=80=99 tri= es to substitute and does nothing if that fails.) Ludo=E2=80=99.