From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:59998) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iTltx-0004Z2-J5 for guix-patches@gnu.org; Sun, 10 Nov 2019 07:01:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iTltv-00082N-MO for guix-patches@gnu.org; Sun, 10 Nov 2019 07:01:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41908) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iTltu-000826-E6 for guix-patches@gnu.org; Sun, 10 Nov 2019 07:01:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iTltu-0003lJ-Aq for guix-patches@gnu.org; Sun, 10 Nov 2019 07:01:02 -0500 Subject: [bug#37978] [PATCH 1/2] guix: new command "guix time-machine" Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87y2wt3ycb.fsf@gnu.org> Date: Sun, 10 Nov 2019 13:00:33 +0100 In-Reply-To: (Konrad Hinsen's message of "Fri, 08 Nov 2019 15:13:48 +0100") Message-ID: <87k1883pr2.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Konrad Hinsen Cc: 37978@debbugs.gnu.org Hi Konrad, Thanks for the updated patch! Konrad Hinsen skribis: > * guix/scripts/time-machine.scm: New file. > * Makefile.am: (MODULES): Add it. > * guix/scripts/pull.scm: Export function channel-list. > * guix/inferior.scm: New function cached-guix-filetree-for-channels. > * doc/guix.texi: Document "guix time-machine" [...] > +(define* (cached-guix-filetree-for-channels channels > + #:key > + (cache-directory (%inferior-= cache-directory)) > + (ttl (* 3600 24 30))) > + "Return a directory containing a guix filetree defined by CHANNELS, a = list of channels. > +The directory is a subdirectory of CACHE-DIRECTORY, where entries can be= reclaimed after TTL seconds. > +This procedure opens a new connection to the build daemon." > (with-store store It=E2=80=99s the same as in v1, right? How about (1) calling it =E2=80=98cached-channel-instance=E2=80=99 (or simi= lar; as a rule of thumb, I try to avoid =E2=80=9Cguix=E2=80=9D in identifiers as well= as neologisms), and (2) not opening a connection to the daemon? :-) As it stands, this procedure opens a connection unconditionally anyway, so it=E2=80=99s fine IMO to just move that =E2=80=98with-store=E2=80=99 to = time-machine.scm and to =E2=80=98inferior-for-channels=E2=80=99. I also think it would be preferable to make it a separate patch (separate from the one that adds time-machine.scm), if it=E2=80=99s OK for = you. Thoughts? Thank you! Ludo=E2=80=99.