From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#23666: guix download fails for large files Date: Mon, 06 Jun 2016 09:06:07 +0200 Message-ID: <87k2i27q5c.fsf@gnu.org> References: <20160531195631.GA22897@solar> <878typkrqd.fsf@gnu.org> <20160605205839.GB20831@solar> 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]:60717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9ocr-0001tu-4c for bug-guix@gnu.org; Mon, 06 Jun 2016 03:07:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b9ocn-0006jO-T1 for bug-guix@gnu.org; Mon, 06 Jun 2016 03:07:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:43818) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9ocn-0006j9-PO for bug-guix@gnu.org; Mon, 06 Jun 2016 03:07:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b9ocn-000234-Kk for bug-guix@gnu.org; Mon, 06 Jun 2016 03:07:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20160605205839.GB20831@solar> (Andreas Enge's message of "Sun, 5 Jun 2016 22:58:39 +0200") 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" To: Andreas Enge Cc: 23666@debbugs.gnu.org Andreas Enge skribis: > On Wed, Jun 01, 2016 at 02:39:54PM +0200, Ludovic Court=C3=A8s wrote: >> This is implemented using the =E2=80=98add-to-store=E2=80=99 RPC, which,= after all these >> years, is still implemented like this (nix/libstore/local-store.cc): >>=20 >> --8<---------------cut here---------------start------------->8--- >> Path LocalStore::addToStore(const string & name, const Path & _srcPath, >> bool recursive, HashType hashAlgo, PathFilter & filter, bool repair) >> { >> Path srcPath(absPath(_srcPath)); >> debug(format("adding `%1%' to the store") % srcPath); >>=20 >> /* Read the whole path into memory. This is not a very scalable >> method for very large paths, but `copyPath' is mainly used for >> small files. */ >> --8<---------------cut here---------------end--------------->8--- > > Something that mainly does not fail could indeed be seen as a bug... > But how come that "guix download http://" succeeds, where > "guix download file://" fails? Both use the =E2=80=98add-to-store=E2=80=99 RPC, so both have equal chances= of failing. Note that, fortunately, fixed-output derivations (=E2=80=98guix build -S fo= o=E2=80=99) do not use =E2=80=98add-to-store=E2=80=99. In general, except in the case = of =E2=80=98guix download=E2=80=99, =E2=80=98add-to-store=E2=80=99 is only used with small f= iles like when adding .scm files to the store, etc. Ludo=E2=80=99.