diff options
author | Alex Kost <alezost@gmail.com> | 2014-10-10 17:58:43 +0400 |
---|---|---|
committer | Alex Kost <alezost@gmail.com> | 2014-10-12 08:45:38 +0400 |
commit | b3bb82f1542ec0805b87305482829102f2faaa92 (patch) | |
tree | e209c5e03ff1ad44068bf84e6f2402a364ed42fa /doc | |
parent | 3ccde087528cc04ef5275224ca6123b68e075e3c (diff) | |
download | patches-b3bb82f1542ec0805b87305482829102f2faaa92.tar patches-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')
-rw-r--r-- | doc/guix.texi | 15 |
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 |