aboutsummaryrefslogtreecommitdiff
path: root/doc/guix.texi
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2014-10-10 17:58:43 +0400
committerAlex Kost <alezost@gmail.com>2014-10-12 08:45:38 +0400
commitb3bb82f1542ec0805b87305482829102f2faaa92 (patch)
treee209c5e03ff1ad44068bf84e6f2402a364ed42fa /doc/guix.texi
parent3ccde087528cc04ef5275224ca6123b68e075e3c (diff)
downloadguix-b3bb82f1542ec0805b87305482829102f2faaa92.tar
guix-b3bb82f1542ec0805b87305482829102f2faaa92.tar.gz
guix package: Add '--switch-generation' option.
* guix/scripts/package.scm (switch-to-generation): New procedure. (switch-to-previous-generation): Use it. (guix-package): Adjust for '--switch-generation' option. * tests/guix-package.sh: Test it. * doc/guix.texi (Invoking guix package): Document it.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r--doc/guix.texi15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 13bcd103ca..bbe84ab275 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -806,6 +806,21 @@ Installing, removing, or upgrading packages from a generation that has
been rolled back to overwrites previous future generations. Thus, the
history of a profile's generations is always linear.
+@item --switch-generation=@var{pattern}
+@itemx -S @var{pattern}
+Switch to a particular generation defined by @var{pattern}.
+
+@var{pattern} may be either a generation number or a number prefixed
+with ``+'' or ``-''. The latter means: move forward/backward by a
+specified number of generations. For example, if you want to return to
+the latest generation after @code{--roll-back}, use
+@code{--switch-generation=+1}.
+
+The difference between @code{--roll-back} and
+@code{--switch-generation=-1} is that @code{--switch-generation} will
+not make a zeroth generation, so if a specified generation does not
+exist, the current generation will not be changed.
+
@item --search-paths
@cindex search paths
Report environment variable definitions, in Bash syntax, that may be