GNU bug report logs -
#71802
[PATCH 0/1] Avoid guix home reconfiguration when nothing is to be done.
Previous Next
Full log
Message #8 received at 71802 <at> debbugs.gnu.org (full text, mbox):
* guix/scripts/home.scm (perform-action): In case of 'reconfigure
action, when the output profile is the current profile, avoid
reconfiguration.
Change-Id: I9d4413df05455a1ebbe10773a851a61e1c8c9e66
---
guix/scripts/home.scm | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/guix/scripts/home.scm b/guix/scripts/home.scm
index b4c82d275f1..f0b8251c435 100644
--- a/guix/scripts/home.scm
+++ b/guix/scripts/home.scm
@@ -446,12 +446,16 @@ (define println
(generation (generation-file-name
%guix-home (+ 1 number))))
- (switch-symlinks generation he-out-path)
- (switch-symlinks %guix-home generation)
- (setenv "GUIX_NEW_HOME" he-out-path)
- (primitive-load (string-append he-out-path "/activate"))
- (setenv "GUIX_NEW_HOME" #f)
- (return he-out-path)))
+ (if (equal? he-out-path (readlink* %guix-home))
+ (begin (info (G_ "Nothing to be done.~%"))
+ (return #f))
+ (begin
+ (switch-symlinks generation he-out-path)
+ (switch-symlinks %guix-home generation)
+ (setenv "GUIX_NEW_HOME" he-out-path)
+ (primitive-load (string-append he-out-path "/activate"))
+ (setenv "GUIX_NEW_HOME" #f)
+ (return he-out-path)))))
((container)
(mlet %store-monad ((status (spawn-home-container
he
--
2.45.2
This bug report was last modified 351 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.