guix-devel
[Top][All Lists]
Advanced

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

Re: Proposal: prefetch tarballs in a batch


From: Ludovic Courtès
Subject: Re: Proposal: prefetch tarballs in a batch
Date: Fri, 28 Mar 2014 14:23:35 +0100
User-agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux)

Nikita Karetnikov <address@hidden> 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’t usually have Internet
> access.  So it’d be nice to do something like ‘guix package
> –install={foo,bar,baz}’ at home, run ‘pm-hibernate’ 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’d 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 ‘guix build’, how hard would it
> be?

My first reaction was that, often

  guix build -S foo bar baz

would be enough.  However, it doesnt’t 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 ‘foo’, accumulate its ‘package-source’, then traverse its inputs,
etc.  Recursion would stop at the implicit inputs (GCC, glibc,
Coreutils, etc.), though.

If you’d like implicit inputs to be taken into account, then you’d have
to traverse derivations.  It’s less convenient because it’s lower-level.

WDYT?

Ludo’.



reply via email to

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