unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Simon Tournier <zimon.toutoune@gmail.com>
To: 65788@debbugs.gnu.org
Subject: bug#65788: poor information when updating using “guix time-machine”
Date: Wed, 06 Sep 2023 18:57:38 +0200	[thread overview]
Message-ID: <87pm2vme7x.fsf@gmail.com> (raw)

Hi,

Tangential of bug#65787 [1], the annoyance is the order of the updates.
It leads to poor messages.  Let exemplify at the extreme case.

--8<---------------cut here---------------start------------->8---
$ guix describe
Generation 28	sept. 06 2023 14:54:50	(current)
  guix 6113e05
    repository URL: https://git.savannah.gnu.org/git/guix.git
    commit: 6113e0529d61df7425f64e30a6bf77f7cfdfe5a5

$ rm -fr ~/.cache/guix/checkouts/pjmkglp4t7znuugeurpurzikxq3tnlaywmisyr27shj7apsnalwq

$ guix time-machine -q --commit=6113e05 -- describe
receiving objects   2% ▕█▋
    …some time flies…
indexing objects  21% ▕███████████████████████                                                                                       ▏
    …some time flies…
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
   …instant…
Computing Guix derivation for 'x86_64-linux'... \
--8<---------------cut here---------------end--------------->8---

The reason is because the logic:

        (when (procedure? validate-channels)
          (validate-channels channels))
        (run-with-store store
          (mlet* %store-monad ((instances
                                -> (latest-channel-instances store channels
                                                             #:authenticate?
                                                             authenticate?))

where ’validate-channels’ (validate-guix-channel) reads,

                (checkout commit relation (update-cached-checkout
                                           (channel-url guix-channel)
                                           #:ref reference
                                           #:starting-commit
                                           %oldest-possible-commit)))

and ’latest-channel-instances’ which is the ones that displays,

                     (format (current-error-port)
                             (G_ "Updating channel '~a' from Git repository at '~a'...~%")
                             (channel-name channel)
                             (channel-url channel))


this ’latest-channel-instances’ reads under the hood,

               ((checkout commit relation)
                (update-cached-checkout (channel-url channel)
                                        #:ref (channel-reference channel)
                                        #:starting-commit starting-commit)))


Why not move this ’validate-guix-channel’ to internals.  Somehow, it is
in guix/scripts/ because it captures ’ref’.  However, this capture is
redundant and is normally managed by ’channel-list’.  Therefore, I would
be tempted to have this validation for the reachable commit close to the
“Updating” message.

WDYT?

Cheers,
simon


1: <https://issues.guix.gnu.org/issue/65787>




             reply	other threads:[~2023-09-06 16:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-06 16:57 Simon Tournier [this message]
2023-10-28 14:16 ` bug#65788: poor information when updating using “guix time-machine” Ludovic Courtès
2023-10-31 14:55   ` Maxim Cournoyer
2023-12-19 14:36   ` Simon Tournier

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=87pm2vme7x.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=65788@debbugs.gnu.org \
    /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).