@@ -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