* guix/channels.scm (<channel>)
[allow-unrelated?, allow-downgrade?]: New fields.
(ensure-forward-channel-update): Handle the fields appropriately.
guix/channels.scm | 5 +++++
1 file changed, 5 insertions(+)
Some time ago, guix pull started verifying that the new commit follows
the old commit in the git history. That's good in the common case, but
unfortunately, this broke my workflow .
Namely, I maintain a branch of the guix repository on which I
cherry-pick some commits that haven't hit master yet. I rebase it onto
It gets tiring to have to specify --allow-downgrades when pulling, so I
added a way of specifying it in the channels file. As a bonus, it's more
If this is the right approach, I'll add some docs. Also, is there a test
that exercises this function?
Toggle diff (32 lines)
diff --git a/guix/channels.scm b/guix/channels.scm
index 84c47fc0d0..17c4f3750c 100644
@@ -2,6 +2,7 @@
;;; Copyright © 2018, 2019, 2020 Ludovic Courtès <firstname.lastname@example.org>
;;; Copyright © 2018 Ricardo Wurmus <email@example.com>
;;; Copyright © 2019 Jan (janneke) Nieuwenhuizen <firstname.lastname@example.org>
+;;; Copyright © 2020 Jakub Kądziołka <email@example.com>
;;; This file is part of GNU Guix.
@@ -104,6 +105,8 @@
(branch channel-branch (default "master"))
(commit channel-commit (default #f))
+ (allow-unrelated? channel-allow-unrelated? (default #f))
+ (allow-downgrade? channel-allow-downgrade? (default #f))
(default (current-source-location)) (innate)))
@@ -245,6 +248,8 @@ This procedure implements a channel update policy meant to be used as a
+ ((? (const (channel-allow-unrelated? channel)) 'unrelated) #t)
+ ((? (const (channel-allow-downgrade? channel)) 'descendant) #t)