GNU bug report logs - #72928
[PATCH] time-machine: Print profile path if no command is given.

Previous Next

Package: guix-patches;

Reported by: Tomas Volf <~@wolfsden.cz>

Date: Sun, 1 Sep 2024 13:57:02 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: Tomas Volf <~@wolfsden.cz>
To: Simon Tournier <zimon.toutoune <at> gmail.com>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>, Mathieu Othacehe <othacehe <at> gnu.org>, Ludovic Courtès <ludo <at> gnu.org>, Tobias Geerinckx-Rice <me <at> tobias.gr>, Christopher Baines <guix <at> cbaines.net>, 72928 <at> debbugs.gnu.org
Subject: [bug#72928] [PATCH] time-machine: Print profile path if no command is given.
Date: Sun, 22 Sep 2024 16:09:52 +0200
[Message part 1 (text/plain, inline)]
Hi,

Simon Tournier <zimon.toutoune <at> gmail.com> writes:

> Hi,
>
> On dim., 15 sept. 2024 at 23:29, Ludovic Courtès <ludo <at> gnu.org> wrote:
>
>>> Printing directory gives nice symmetry between
>>>
>>> $ $(guix build guix)/bin/guix describe
>
> [...]
>
>>> $ $(guix time-machine -q --commit=9a2ddcc8f5a6f64b475eeb13a3f1034aa6a4a49a)/bin/guix describe
>
> [...]
>
>>> And in some cases you need the store item (guix copy?), and in my
>>> opinion it is easier to go from directory to binary than other way
>>> around.
>
> Well, I do not have a strong opinion.  And indeed the symmetry looks
> nice.  However, just to be sure: what’s the use case?  Because
>
>
>     $(guix time-machine -q --commit=9a2ddcc8f5a6f64b475eeb13a3f1034aa6a4a49a)/bin/guix describe
>
> is equivalent to:
>
>     guix time-machine -q --commit=9a2ddcc8f5a6f64b475eeb13a3f1034aa6a4a49a -- describe

That is true.  While I think the symmetry is nice (and goes with
principle of least surprise), I am not interested in running guix this
way.

I am interested in getting the store item for the time-machined version
of guix.  Currently I have two uses in mind:

1. Using `guix copy' to avoid computing the guix derivation when I need
to test something on less powerful machines.  Guix does not built fast,
so this saves both time and electricity.

2. Having something to pass into guix field of guix-configuration.

Guix time-machine works great for both, since it is automatically built,
cached and automatically cleaned after some time.  Only pain point is
getting the profile store path out of it.  With the proposed change it
will be as simple as

--8<---------------cut here---------------start------------->8---
store_item=$(realpath $(guix time-machine -C channels.scm))
--8<---------------cut here---------------end--------------->8---

Does this sufficiently justify the existence of this functionality in
your eyes?

Have a nice day,
Tomas

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 227 days ago.

Previous Next


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