mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
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.
This commit is contained in:
parent
43badf261f
commit
5bafc70d1e
3 changed files with 26 additions and 25 deletions
|
@ -195,20 +195,18 @@ Download and deploy the latest version of Guix.\n"))
|
|||
|
||||
%standard-build-options))
|
||||
|
||||
(define (warn-about-backward-updates channel start instance relation)
|
||||
"Warn about non-forward updates of CHANNEL from START to INSTANCE, without
|
||||
(define (warn-about-backward-updates channel start commit relation)
|
||||
"Warn about non-forward updates of CHANNEL from START to COMMIT, without
|
||||
aborting."
|
||||
(match relation
|
||||
((or 'ancestor 'self)
|
||||
#t)
|
||||
('descendant
|
||||
(warning (G_ "rolling back channel '~a' from ~a to ~a~%")
|
||||
(channel-name channel) start
|
||||
(channel-instance-commit instance)))
|
||||
(channel-name channel) start commit))
|
||||
('unrelated
|
||||
(warning (G_ "moving channel '~a' from ~a to unrelated commit ~a~%")
|
||||
(channel-name channel) start
|
||||
(channel-instance-commit instance)))))
|
||||
(channel-name channel) start commit))))
|
||||
|
||||
(define* (display-profile-news profile #:key concise?
|
||||
current-is-newer?)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue