From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: updating list of substitutes Date: Thu, 23 Apr 2015 11:52:10 +0200 Message-ID: <87383ri33p.fsf@gnu.org> References: <20150421064525.GA15795@thebird.nl> <87a8y1q49z.fsf@gnu.org> <20150421084028.GB16564@thebird.nl> <20150422114635.GA24566@thebird.nl> <20150422122421.GA4739@debian.math.u-bordeaux1.fr> 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]:37254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlDns-0001PD-GP for guix-devel@gnu.org; Thu, 23 Apr 2015 05:52:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YlDno-0006w8-GH for guix-devel@gnu.org; Thu, 23 Apr 2015 05:52:16 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43797) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlDno-0006w4-Cu for guix-devel@gnu.org; Thu, 23 Apr 2015 05:52:12 -0400 In-Reply-To: <20150422122421.GA4739@debian.math.u-bordeaux1.fr> (Andreas Enge's message of "Wed, 22 Apr 2015 14:24:21 +0200") 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: Andreas Enge Cc: guix-devel@gnu.org Andreas Enge skribis: > On Wed, Apr 22, 2015 at 01:46:35PM +0200, Pjotr Prins wrote: >> 5. We reload the list of substitutes after a fixed time >> Let me rephrase. Can we have a more lazy approach towards fetching >> substitutes? Rather than a fixed TTL we could fetch the latest list on >> the first failed substitute. > > A while ago, the list of substitutes was downloaded even when removing > packages from a profile, which Ludovic fixed if I remember correctly. Not really, see below. > But even when installing, one may not need to download anything if the > package is already in the store. So I think the following would be good: > Determine the list of packages to be installed in a profile with "guix > package" or to be built with "guix build". If they are all in the store, > fine, otherwise, check the age of the list of substitutes and if it is > to old, download it again. This is correct, except it=E2=80=99s not just about packages explicitly specified by the user: anytime the daemon is asked to build something, it calls out to =E2=80=98guix substitute=E2=80=99, which tells it whether a= substitute is available for that thing. =E2=80=98guix substitute=E2=80=99 has a cache of what=E2=80=99s available, = which it refreshes when it gets too old (hence the =E2=80=9Cupdating substitute list=E2=80=9D = message.) =E2=80=98guix package -r=E2=80=99 actually asks the daemon to build/downloa= d (if needed) the Guile package that is used to create the new profile. If that Guile package is missing, then it is built/downloaded. HTH, Ludo=E2=80=99.