diff --git a/gnu/tests/reconfigure.scm b/gnu/tests/reconfigure.scm index 00514e7020..bcc7645fa3 100644 --- a/gnu/tests/reconfigure.scm +++ b/gnu/tests/reconfigure.scm @@ -92,15 +92,12 @@ generation of the system profile." (length (system-generations marionette)) (1+ (length generations-prior))) - (test-assert "script activated the new generation" - (and (eqv? 'symlink - (marionette-eval - '(stat:type (lstat "/run/current-system")) - marionette)) - (string= #$os - (marionette-eval - '(readlink "/run/current-system") - marionette)))) + (test-equal "script activated the new generation" + (string-append "/var/guix/profiles/system-" + (number->string (+ 1 (length generations-prior))) + "-link") + (marionette-eval '(readlink "/run/current-system") + marionette)) (test-assert "script activated user accounts" (marionette-eval diff --git a/guix/scripts/system/reconfigure.scm b/guix/scripts/system/reconfigure.scm index 9418060158..604ba08fee 100644 --- a/guix/scripts/system/reconfigure.scm +++ b/guix/scripts/system/reconfigure.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014-2022 Ludovic Courtès +;;; Copyright © 2014-2022, 2024 Ludovic Courtès ;;; Copyright © 2016 Alex Kost ;;; Copyright © 2016, 2017, 2018 Chris Marusich ;;; Copyright © 2017 Mathieu Othacehe @@ -106,7 +106,7 @@ atomically, and run OS's activation script." (generation (generation-file-name profile number))) (switch-symlinks generation #$os) (switch-symlinks profile generation) - (setenv "GUIX_NEW_SYSTEM" #$os) + (setenv "GUIX_NEW_SYSTEM" generation) (primitive-load #$(operating-system-activation-script os)))))))) (define* (switch-to-system eval os #:optional profile)