summaryrefslogtreecommitdiff
path: root/guix/scripts
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-06-08 22:46:06 +0200
committerLudovic Courtès <ludo@gnu.org>2020-06-16 16:10:47 +0200
commit5bafc70d1e1daf6a91e8bf29a464263262505f2f (patch)
treebd133cebbc08856c3149f648cb5dac18fa0ebd1a /guix/scripts
parent43badf261f4688c8a7a7a9004a4bff8acb205835 (diff)
downloadguix-patches-5bafc70d1e1daf6a91e8bf29a464263262505f2f.tar
guix-patches-5bafc70d1e1daf6a91e8bf29a464263262505f2f.tar.gz
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.
Diffstat (limited to 'guix/scripts')
-rw-r--r--guix/scripts/pull.scm10
1 files changed, 4 insertions, 6 deletions
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index c386d81b8e..d3d0d2bd64 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -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?)