[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: guix system: If the new system generation already exists, overwri

From: Ludovic Courtès
Subject: 01/02: guix system: If the new system generation already exists, overwrite it.
Date: Mon, 5 Dec 2016 22:20:48 +0000 (UTC)

civodul pushed a commit to branch master
in repository guix.

commit 067a2e2de9e5f8437ce020c62f64e08b82af72b8
Author: Chris Marusich <address@hidden>
Date:   Fri Dec 2 01:52:04 2016 -0800

    guix system: If the new system generation already exists, overwrite it.
    Fixes <>.
    Before that, 'guix system reconfigure' would fail if the next generation
    already existed.
    * guix/scripts/system.scm (switch-to-system): Use 'switch-symlink'
    instead of 'symlink'.
    * doc/guix.texi (Using the Configuration System, Invoking guix system):
    Document the behavior.
    Signed-off-by: Ludovic Courtès <address@hidden>
 doc/guix.texi           |   16 +++++++++++++++-
 guix/scripts/system.scm |    2 +-
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 4d7f96d..5c94a56 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -7174,7 +7174,15 @@ modifying or deleting previous generations.  Old system 
generations get
 an entry in the GRUB boot menu, allowing you to boot them in case
 something went wrong with the latest generation.  Reassuring, no?  The
 @command{guix system list-generations} command lists the system
-generations available on disk.
+generations available on disk.  It is also possible to roll back the
+system via the commands @command{guix system roll-back} and
address@hidden system switch-generation}.
+Although the command @command{guix system reconfigure} will not modify
+previous generations, must take care when the current generation is not
+the latest (e.g., after invoking @command{guix system roll-back}), since
+the operation might overwrite a later generation (@pxref{Invoking guix
 @unnumberedsubsubsec The Programming Interface
@@ -12599,6 +12607,12 @@ currently running; if a service is currently running, 
it does not
 attempt to upgrade it since this would not be possible without stopping it
+This command creates a new generation whose number is one greater than
+the current generation (as reported by @command{guix system
+list-generations}).  If that generation already exists, it will be
+overwritten.  This behavior mirrors that of @command{guix package}
+(@pxref{Invoking guix package}).
 It also adds a GRUB menu entry for the new OS configuration, and moves
 entries for older configurations to a submenu---unless
 @option{--no-grub} is passed.
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index bb373a6..144a7fd 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -326,7 +326,7 @@ it atomically, and then run OS's activation script."
     (let* ((system     (derivation->output-path drv))
            (number     (+ 1 (generation-number profile)))
            (generation (generation-file-name profile number)))
-      (symlink system generation)
+      (switch-symlinks generation system)
       (switch-symlinks profile generation)
       (format #t (_ "activating system...~%"))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]