guix-package: Always use the next number for new generations.
authorLudovic Courtès <ludo@gnu.org>
Sun, 27 Jan 2013 16:58:46 +0000 (17:58 +0100)
committerLudovic Courtès <ludo@gnu.org>
Sun, 27 Jan 2013 16:58:46 +0000 (17:58 +0100)
commit82fe08ed207a17c51370dc90e965c15ee9db9235
treef9a06dfc729e5ce0af5013fa1370b875b7e3014f
parentd9307267b3b4a87391e33daacef162745f057c3d
guix-package: Always use the next number for new generations.

Suggested by Andreas Enge <andreas@enge.fr> at
<http://lists.gnu.org/archive/html/bug-guix/2013-01/msg00325.html>.

* guix-package.in (latest-profile-number): Remove.
  (switch-symlinks): New procedure.
  (roll-back)[switch-link]: Use it.
  (guix-package)[process-actions]: Always choose NUMBER + 1 for the new
  profile.  Use `switch-symlinks' instead of `symlink'.  Remove code to
  delete PROFILE when it exists since `switch-symlinks' has the same
  effect.
* tests/guix-package.sh: Adjust existing `--roll-back' tests.
* doc/guix.texi (Invoking guix-package): Document this `--roll-back'
  behavior.
doc/guix.texi
guix-package.in
tests/guix-package.sh