From 24e262f086980a13d9d0a27615ed7eaec4aacbff Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 17 Jan 2013 22:20:42 +0100 Subject: guix-package: Add `--roll-back'. Based on a patch by Nikita Karetnikov . * guix-package.in (profile-regexp): New procedure. (latest-profile-number): Remove `%profile-rx', and use `profile-regexp' instead. (profile-number, roll-back): New procedure. (show-help): Add `--roll-back'. (%options): Likewise. (guix-package)[process-actions]: First check whether `roll-back?' is among OPTS, and call `roll-back' if it is, followed by a recursive call to `process-actions'. Emit the "nothing to be done" message only when INSTALL or REMOVE is non-empty. * tests/guix-package.sh (readlink_base): New function. Add tests for `--roll-back'. * doc/guix.texi (Invoking guix-package): Document `--roll-back'. --- doc/guix.texi | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 27a00a6ed9..a41560e75c 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -490,6 +490,13 @@ Remove @var{package}. @itemx -u @var{regexp} Upgrade all the installed packages matching @var{regexp}. +@item --roll-back +Roll back to the previous @dfn{generation} of the profile---i.e., undo +the last transaction. + +When combined with options such as @code{--install}, roll back occurs +before any other actions. + @item --profile=@var{profile} @itemx -p @var{profile} Use @var{profile} instead of the user's default profile. -- cgit v1.2.3