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: Fri, 28 Mar 2014 14:23:35 +0100 Message-ID: <877g7epico.fsf@gnu.org> References: <87ha6jkyv8.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]:59499) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTWl7-0007wV-F6 for guix-devel@gnu.org; Fri, 28 Mar 2014 09:23:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTWl0-00027d-6D for guix-devel@gnu.org; Fri, 28 Mar 2014 09:23:45 -0400 Received: from hera.aquilenet.fr ([2a01:474::1]:51074) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTWkz-00027U-VS for guix-devel@gnu.org; Fri, 28 Mar 2014 09:23:38 -0400 In-Reply-To: <87ha6jkyv8.fsf@karetnikov.org> (Nikita Karetnikov's message of "Fri, 28 Mar 2014 03:25:47 +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: > By default, Guix fetches source tarballs on demand. You download a > tarball, configure and install, move to the next one, and so on. But it > may be useful to fetch all the prerequisites before building. > > For instance, you travel frequently and don=E2=80=99t usually have Intern= et > access. So it=E2=80=99d be nice to do something like =E2=80=98guix packa= ge > =E2=80=93install=3D{foo,bar,baz}=E2=80=99 at home, run =E2=80=98pm-hibern= ate=E2=80=99 at some point, hop > on a train, and continue building if the sources got downloaded. > > Actaully, the last part made me realize that it may be better to have a > separate script for downloading. After all, we=E2=80=99d like to ensure = that > the tarballs were fetched, or the train ride would be boring. On IRC, > Ludo suggested to add a new option to =E2=80=98guix build=E2=80=99, how h= ard would it > be? My first reaction was that, often guix build -S foo bar baz would be enough. However, it doesnt=E2=80=99t download the sources of prerequisites. So, what I had in mind is something like, say: guix prefetch foo bar baz which would prefetch the sources of foo, bar, and baz, plus the sources of any missing prerequisites. 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. WDYT? Ludo=E2=80=99.