summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRutherther <rutherther@ditigal.xyz>2025-11-20 18:06:11 +0100
committerRutherther <rutherther@ditigal.xyz>2025-12-22 11:00:18 +0100
commit0ecfe335b9fe66f4120f4df503fd2eb21e847fde (patch)
tree74521fe93eb560446bee3aeab6d4e16ac986dd4a
parent2a0ac4cba5e3816e203b412934ee66345667c5ca (diff)
scripts: system: Do not pull checkouts for same commit.
In case a user reconfigures to the same commit, do not update cached checkout unnecessarily. * guix/scripts/system/reconfigure.scm (channel-relations): Return early for matching old and new commits. Change-Id: Ia4b7300bbce40f7d809946dd3514715b74cd17f9 Signed-off-by: Rutherther <rutherther@ditigal.xyz>
-rw-r--r--guix/scripts/system/reconfigure.scm22
1 files changed, 13 insertions, 9 deletions
diff --git a/guix/scripts/system/reconfigure.scm b/guix/scripts/system/reconfigure.scm
index 8c63921e638..402e6d30fc1 100644
--- a/guix/scripts/system/reconfigure.scm
+++ b/guix/scripts/system/reconfigure.scm
@@ -407,15 +407,19 @@ to commits of channels in NEW."
(channel-name old)))
new)))
(and new
- (let ((checkout commit relation
- (update-cached-checkout
- (channel-url new)
- #:ref `(commit . ,(channel-commit new))
- #:starting-commit (channel-commit old)
- #:check-out? #f)))
- (list new
- (channel-commit old) (channel-commit new)
- relation)))))
+ (if (string=? (channel-commit old) (channel-commit new))
+ (list new
+ (channel-commit old) (channel-commit new)
+ 'self)
+ (let ((checkout commit relation
+ (update-cached-checkout
+ (channel-url new)
+ #:ref `(commit . ,(channel-commit new))
+ #:starting-commit (channel-commit old)
+ #:check-out? #f)))
+ (list new
+ (channel-commit old) (channel-commit new)
+ relation))))))
old))
(define* (check-forward-update #:optional