From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Proposal: prefetch tarballs in a batch Date: Wed, 02 Apr 2014 14:57:09 +0200 Message-ID: <87ha6blwii.fsf@gnu.org> References: <87ha6jkyv8.fsf@karetnikov.org> <877g7epico.fsf@gnu.org> <87wqf8prau.fsf@karetnikov.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]:33997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVKjH-0006Ar-V0 for guix-devel@gnu.org; Wed, 02 Apr 2014 08:57:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVKjC-0007Lc-Np for guix-devel@gnu.org; Wed, 02 Apr 2014 08:57:19 -0400 Received: from hera.aquilenet.fr ([2a01:474::1]:56230) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVKjC-0007LD-Ht for guix-devel@gnu.org; Wed, 02 Apr 2014 08:57:14 -0400 In-Reply-To: <87wqf8prau.fsf@karetnikov.org> (Nikita Karetnikov's message of "Wed, 02 Apr 2014 03:23:53 +0400") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Nikita Karetnikov Cc: guix-devel@gnu.org Nikita Karetnikov skribis: >> The simplest way to do it would be by walking the package DAG: start >> from =E2=80=98foo=E2=80=99, accumulate its =E2=80=98package-source=E2=80= =99, then traverse its inputs, >> etc. Recursion would stop at the implicit inputs (GCC, glibc, >> Coreutils, etc.), though. > >> If you=E2=80=99d like implicit inputs to be taken into account, then you= =E2=80=99d have >> to traverse derivations. It=E2=80=99s less convenient because it=E2=80= =99s lower-level. > > Is there a function that accepts a package name and returns a list of > implicit inputs? No, because by definition, those =E2=80=9Cimplicit inputs=E2=80=9D are not = listed in the package object. Instead, they are added by the build system (see build-system/gnu.scm.) That=E2=80=99s why I suggested using derivations instead: take the output of (package-derivation x y), and traverse it in search of fixed-output derivations. But again, that=E2=80=99s a bit of a sledgehammer, and somewhat inconvenien= t to do at the moment. Ludo=E2=80=99.