GNU bug report logs - #65352
Fix time-machine and network

Previous Next

Package: guix-patches;

Reported by: Simon Tournier <zimon.toutoune <at> gmail.com>

Date: Thu, 17 Aug 2023 14:08:02 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>, Ludovic Courtès <ludo <at> gnu.org>
Cc: 65352 <at> debbugs.gnu.org
Subject: [bug#65352] Fix time-machine and network
Date: Tue, 05 Sep 2023 22:56:11 +0200
Hi Maxim,

On Tue, 05 Sep 2023 at 16:39, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> wrote:

> I've reviewed this thread and the code, and I agree.  This is a special
> case.  I've added a comment so we aren't tempted to use
> 'resolve-reference' there again.

I disagree.  There is no special case.  The culprit is the procedure
’validate-guix-channel’ as explained in:

        [bug#65352] Fix time-machine and network
        Simon Tournier <zimon.toutoune <at> gmail.com>
        Mon, 04 Sep 2023 19:37:08 +0200
        id:87wmx5on5n.fsf <at> gmail.com
        https://issues.guix.gnu.org//65352
        https://issues.guix.gnu.org/msgid/87wmx5on5n.fsf <at> gmail.com
        https://yhetil.org/guix/87wmx5on5n.fsf <at> gmail.com


> Will install shortly.

I do not know what you will install shortly.  The fix belong to
validate-guix-channel, something like:

         (let* ((guix-channel (find guix-channel? channels))
                (reference (or ref
                               (match (channel-commit guix-channel)
                                 (#f `(branch . ,(channel-branch guix-channel)))
                                 (commit `(tag-or-commit . ,commit)))))
                (checkout commit relation (update-cached-checkout
                                           (channel-url guix-channel)
                                           #:ref reference
                                           #:starting-commit
                                           %oldest-possible-commit)))

and that would avoid to break the “contract” of resolve-reference.
Before committing something, I was testing.

Cheers,
simon






This bug report was last modified 1 year and 242 days ago.

Previous Next


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