GNU bug report logs - #37978
[PATCH] guix: new command "guix time-machine"

Previous Next

Package: guix-patches;

Reported by: Konrad Hinsen <konrad.hinsen <at> fastmail.net>

Date: Tue, 29 Oct 2019 14:12:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: Konrad Hinsen <konrad.hinsen <at> fastmail.net>
Cc: 37978 <at> debbugs.gnu.org
Subject: [bug#37978] [PATCH 1/2] guix: new command "guix time-machine"
Date: Sun, 10 Nov 2019 13:00:33 +0100
Hi Konrad,

Thanks for the updated patch!

Konrad Hinsen <konrad.hinsen <at> fastmail.net> 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’s the same as in v1, right?

How about (1) calling it ‘cached-channel-instance’ (or similar; as a
rule of thumb, I try to avoid “guix” 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’s fine IMO to just move that ‘with-store’ to time-machine.scm and
to ‘inferior-for-channels’.

I also think it would be preferable to make it a separate patch
(separate from the one that adds time-machine.scm), if it’s OK for you.

Thoughts?

Thank you!

Ludo’.




This bug report was last modified 5 years and 191 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.