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, 25 Apr 2014 13:51:42 +0200 Message-ID: <87oazpaapd.fsf@gnu.org> References: <87ha6jkyv8.fsf@karetnikov.org> <877g7epico.fsf@gnu.org> <87wqf8prau.fsf@karetnikov.org> <87ha6blwii.fsf@gnu.org> <87d2gznysk.fsf@karetnikov.org> <87vbuqvpsc.fsf@gnu.org> <87ha62dtmh.fsf@karetnikov.org> <87vbuhbnn8.fsf@gnu.org> <87ioqe2tdg.fsf@karetnikov.org> <87bnw6yxql.fsf@gnu.org> <871twmo25m.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]:50263) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WdefW-0008EQ-L2 for guix-devel@gnu.org; Fri, 25 Apr 2014 07:51:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WdefR-0000v8-6g for guix-devel@gnu.org; Fri, 25 Apr 2014 07:51:50 -0400 Received: from hera.aquilenet.fr ([2a01:474::1]:43685) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WdefQ-0000ug-P5 for guix-devel@gnu.org; Fri, 25 Apr 2014 07:51:45 -0400 In-Reply-To: <871twmo25m.fsf@karetnikov.org> (Nikita Karetnikov's message of "Fri, 25 Apr 2014 01:20:21 +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: > 1. =E2=80=98guix prefetch=E2=80=99 tries to configure and build some pack= ages instead of > just downloading them. I tried the following on a machine with the > empty store: > > a. Ran =E2=80=98guix prefetch hello=E2=80=99. Some packages were down= loaded and > built (I gathered those are needed to download the other packages, > so I didn=E2=80=99t write down the names. If I recall correctly, G= uile > was in that list.) Yes, by default =E2=80=98guile-final=E2=80=99 is used to build derivations = (including download derivations), so that needs to be built before anything else can be done. (And that involves building gcc, libc, etc. first.) > b. Invoked =E2=80=98guix build hello=E2=80=99 without network access. = The command > succeeded. No questions here. > > c. Called =E2=80=98guix prefetch emacs=E2=80=99. These packages were = configured and > built: pkg-config, libunistring, ncurses, libatomic_ops, patch, > tar, xz, gzip, zlib, which, gc, perl, m4, readline, libffi, > texinfo, libtool, gmp, libtasn1, nettle, guile, gnutls. > > Are these essential, or is there an error in =E2=80=98guix prefetch= =E2=80=99? > According to the build logs, the install prefix of gmp is > =E2=80=98/gnu/store/hpaz49xz76p4qmpjc9r33hni1w781y66-gmp-5.1.3=E2= =80=99, which > doesn=E2=80=99t appear in the lists provided by =E2=80=98guix prefe= tch hello=E2=80=99 and > =E2=80=98guix prefetch emacs=E2=80=99. I=E2=80=99m not sure why it= =E2=80=99s the case. Perhaps these were just the prerequisites for =E2=80=98guile-final=E2=80=99= no? > 2. I think it would be nice to output the location of a tarball after > running =E2=80=98guix prefetch=E2=80=99, but I=E2=80=99m not sure how = to get the relevant > derivation. For =E2=80=98hello=E2=80=99, it=E2=80=99s neither > > (package-source-derivation store (package-source hello)) > > nor > > (package-derivation store hello) > > because the derivation listed in the initial output of =E2=80=98guix p= refetch > hello=E2=80=99 differs. Of course, it=E2=80=99s possible to filter th= e list > produced by > > (build-derivations > store > (map (lambda (drv) > ;; (format #t " ~a~%" (derivation-file-name drv)) > (format #t " ~a~%" drv) > drv) > (derivations-to-prefetch > store > (package-derivation store package))))) > > But it=E2=80=99s error-prone, so I=E2=80=99d rather avoid that. I don=E2=80=99t understand. You can do: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> (derivation->output-path (package-source-derivation s (package-source hello))) $4 =3D "/gnu/store/070fnjll8hb3q2l4373bbahh2i1n2qhg-hello-2.9.tar.gz" --8<---------------cut here---------------end--------------->8--- Isn=E2=80=99t it what you want? > 3. I=E2=80=99m planning to add =E2=80=98--dry-run=E2=80=99, which will si= mply print the list of > needed derivations. I think this should use =E2=80=98show-what-to-build=E2=80=99, as in =E2=80= =98guix build=E2=80=99 and other commands, so that it would also show what other derivations need to be built, such as those for =E2=80=98guile-final=E2=80=99. > What options would you like to see implemented? Probably all of =E2=80=98%standard-build-options=E2=80=99 from (guix script= s build) can be made available? Thanks for the nice work! Ludo=E2=80=99.