unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Konrad Hinsen <konrad.hinsen@fastmail.net>
To: "Simon Tournier" <zimon.toutoune@gmail.com>,
	"Ludovic Courtès" <ludo@gnu.org>
Cc: 63726@debbugs.gnu.org
Subject: bug#63726: time-machine without options does not get the latest commit
Date: Thu, 01 Jun 2023 17:01:40 +0200	[thread overview]
Message-ID: <m11qivrzu3.fsf@fastmail.net> (raw)
In-Reply-To: <87r0qyrlm0.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 854 bytes --]

Hi Simon,

> What about this patch?

That's a good start! But I didn't quite understand what "as defined by the previous
+@dfn{channels} file" means, so I did some more research and some more
rewriting, and came up with the attached patch. That one is clear for
me, but maybe not for others...

In the course of this research, I noticed that channel files are used in
Guix in two varieties for rather different purposes, but this doesn't
seem to be explained anywhere. "guix describe -f channels" produces
channel files with a pinned commit for each repository. That's what we
usually give to time-machine. That feature of channel files seems even
undocumented. The chapter on channels discusses the channel files we
typically use with "guix pull", and which refer to a branch and thus its
last commit, rather than to a pinned commit.

Cheers,
  Konrad.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-doc-Reword-guix-time-machine-without-option.patch --]
[-- Type: text/x-diff, Size: 2077 bytes --]

From cbe372191a2daea7b62d8558422f08bc6ed0e047 Mon Sep 17 00:00:00 2001
From: Konrad Hinsen <konrad.hinsen@fastmail.net>
Date: Thu, 1 Jun 2023 16:55:33 +0200
Subject: [PATCH] doc: Reword guix time-machine without option.

* doc/guix.texi (Invoking guix time-machine): Reword the behaviour in the
absence of any option.
---
 doc/guix.texi | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 7f8d8d66e9..e4daffe4dd 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -4959,16 +4959,25 @@ Invoking guix time-machine
 @xref{Channels} for more information.
 @end table
 
-As for @command{guix pull}, the absence of any options means that the
-latest commit on the master branch will be used.  The command
+In the absence of any options, the target revision will be determined as
+for @command{guix pull}, i.e. from the user's
+@file{~/.config/guix/channels.scm} file, or, if no such file exists,
+from the system-wide @file{/etc/guix/channels.scm} file, or, if that
+file does not exist either, from the built-in default channels specified
+in the @code{%default-channels} variable.  Note that these three
+fallbacks are usually channel definitions pointing to @i{branches} in
+git repositories, rather then to specific @i{commits}, as the channel
+definitions produced by @command{guix describe} do. A branch-based
+channel definition refers to the latest commit on that branch. The
+command
 
 @example
 guix time-machine -- build hello
 @end example
 
-will thus build the package @code{hello} as defined in the master branch,
-which is in general a newer revision of Guix than you have installed.
-Time travel works in both directions!
+will thus build the package @code{hello} as defined by the current state
+of the default channels. In general, it builds a @i{newer} revision of
+Guix than you have installed.  Time travel works in both directions!
 
 Note that @command{guix time-machine} can trigger builds of channels and
 their dependencies, and these are controlled by the standard build
-- 
2.40.1


  reply	other threads:[~2023-06-01 15:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-25 13:52 bug#63726: time-machine without options does not get the latest commit Simon Tournier
2023-05-25 21:03 ` Ludovic Courtès
2023-05-26  9:31   ` Simon Tournier
2023-05-26 11:15   ` Konrad Hinsen
2023-05-30 13:32     ` Simon Tournier
2023-06-01 15:01       ` Konrad Hinsen [this message]
2023-08-11 15:36         ` Ludovic Courtès
2023-08-14 10:13           ` Konrad Hinsen
2023-08-16 13:51             ` Simon Tournier
2023-08-17  8:42             ` Ludovic Courtès
2023-08-17 13:41               ` Maxim Cournoyer
2023-08-17 14:07                 ` Ludovic Courtès
2023-08-17 14:39                   ` Maxim Cournoyer
2023-09-04 16:55   ` Simon Tournier
2023-09-08 15:39     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m11qivrzu3.fsf@fastmail.net \
    --to=konrad.hinsen@fastmail.net \
    --cc=63726@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).