diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-09-12 17:41:06 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-09-12 22:13:52 +0200 |
commit | 6d49355d8b69869ba46c7ca6a98eafc5dc6c4c64 (patch) | |
tree | e52b48be0d7dca9209d6e506f36815dc6931aa4c /gnu/build | |
parent | ddfc2fd8e0b4a4d2aa647c7ebf98e521bcd9dc2a (diff) |
activation: Honor $GUIX_NEW_SYSTEM for use by 'guix system reconfigure'.
* gnu/build/activation.scm (activate-current-system): Honor
$GUIX_NEW_SYSTEM by default.
* guix/scripts/system.scm (switch-to-system): Set $GUIX_NEW_SYSTEM
before loading SCRIPT.
Diffstat (limited to 'gnu/build')
-rw-r--r-- | gnu/build/activation.scm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm index 04dd19f3e1..16805b9bc6 100644 --- a/gnu/build/activation.scm +++ b/gnu/build/activation.scm @@ -236,8 +236,13 @@ copy SOURCE to TARGET." "Return the '--system' argument passed on the kernel command line." (find-long-option "--system" (linux-command-line))) -(define* (activate-current-system #:optional (system (boot-time-system))) +(define* (activate-current-system + #:optional (system (or (getenv "GUIX_NEW_SYSTEM") + (boot-time-system)))) "Atomically make SYSTEM the current system." + ;; The 'GUIX_NEW_SYSTEM' environment variable is used as a way for 'guix + ;; system reconfigure' to pass the file name of the new system. + (format #t "making '~a' the current system...~%" system) ;; Atomically make SYSTEM current. |