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: Ludovic Courtès <ludo <at> gnu.org>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>, Simon Tournier <zimon.toutoune <at> gmail.com>, Mathieu Othacehe <othacehe <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, 15 Sep 2024 22:38:07 +0200
[Message part 1 (text/plain, inline)]
Hello,

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

> Hi,
>
> Tomas Volf <~@wolfsden.cz> skribis:
>
>> Instead of warning, print the profile path of the cached-channel-instance.
>>
>> * guix/scripts/time-machine.scm (guix-time-machine)[not command-line]: Print
>> the profile directory.
>>
>> Change-Id: Id2c1ded514e6c5af45af9008ad1ef91beb509177
>
> [...]
>
>> +         (if command-line
>> +             (apply execl (cons* executable executable command-line))
>> +             (format #t "~a\n" directory)))))))
>
> Maybe print ‘executable’ rather than ‘directory’?

Printing directory gives nice symmetry between

--8<---------------cut here---------------start------------->8---
$ $(guix build guix)/bin/guix describe
  guix 9a2ddcc
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: 9a2ddcc8f5a6f64b475eeb13a3f1034aa6a4a49a
--8<---------------cut here---------------end--------------->8---

and

--8<---------------cut here---------------start------------->8---
$ $(guix time-machine -q --commit=9a2ddcc8f5a6f64b475eeb13a3f1034aa6a4a49a)/bin/guix describe
  guix 9a2ddcc
    repository URL: https://git.savannah.gnu.org/git/guix.git
    commit: 9a2ddcc8f5a6f64b475eeb13a3f1034aa6a4a49a
--8<---------------cut here---------------end--------------->8---

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.

But just let me know which way I should do it.

>
> Also perhaps add a sentence or two in the manual?

Ah, yeah, definitely.  Once previous point is clarified, I will send v2.

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.