[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#65352] Fix time-machine and network
From: |
Maxim Cournoyer |
Subject: |
[bug#65352] Fix time-machine and network |
Date: |
Tue, 05 Sep 2023 22:39:09 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Hi,
Simon Tournier <zimon.toutoune@gmail.com> writes:
> Hi Maxim,
>
> On Tue, 05 Sep 2023 at 16:39, Maxim Cournoyer <maxim.cournoyer@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:
I was referring to the special case of resolved-reference? (that it
mustn't trust tags or branches in a git cache -- at least currently,
compared to resolve-reference. Maybe we want to change that?
> [bug#65352] Fix time-machine and network
> Simon Tournier <zimon.toutoune@gmail.com>
> Mon, 04 Sep 2023 19:37:08 +0200
> id:87wmx5on5n.fsf@gmail.com
> https://issues.guix.gnu.org//65352
> 87wmx5on5n.fsf@gmail.com">https://issues.guix.gnu.org/msgid/87wmx5on5n.fsf@gmail.com
> 87wmx5on5n.fsf@gmail.com">https://yhetil.org/guix/87wmx5on5n.fsf@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.
That's orthogonal to the other issue discussed, right? What I was
referring to about 'installing' was c3d48d02, which implements the above
(with let-bound variables and 'if' instead of match, but the logic is
the same).
I feel like we need to agree on what reference-available? is supposed to
achieve, and where it needs to differentiate from resolve-reference.
--
Thanks,
Maxim