channels: Make 'validate-pull' call right after clone/pull.
authorLudovic Courtès <ludo@gnu.org>
Mon, 8 Jun 2020 20:46:06 +0000 (22:46 +0200)
committerLudovic Courtès <ludo@gnu.org>
Tue, 16 Jun 2020 14:10:47 +0000 (16:10 +0200)
commit5bafc70d1e1daf6a91e8bf29a464263262505f2f
treebd133cebbc08856c3149f648cb5dac18fa0ebd1a
parent43badf261f4688c8a7a7a9004a4bff8acb205835
channels: Make 'validate-pull' call right after clone/pull.

This should come before patching, authentication, etc.

* guix/channels.scm (latest-channel-instance): Add #:validate-pull
parameter and honor it.  Return a single value: the instance.
(ensure-forward-channel-update): Change 'instance' parameter to 'commit'
and adjust accordingly.
(latest-channel-instances): Adjust to 'latest-channel-instance' changes.
* guix/scripts/pull.scm (warn-about-backward-updates): Change 'instance'
parameter to 'commit' and adjust accordingly.
* tests/channels.scm ("latest-channel-instances #:validate-pull"):
Likewise.
guix/channels.scm
guix/scripts/pull.scm
tests/channels.scm