guix-package: When rolling back to nothingness, point to the empty profile.
authorLudovic Courtès <ludo@gnu.org>
Sun, 27 Jan 2013 16:18:55 +0000 (17:18 +0100)
committerLudovic Courtès <ludo@gnu.org>
Sun, 27 Jan 2013 16:18:55 +0000 (17:18 +0100)
commitd9307267b3b4a87391e33daacef162745f057c3d
tree8aa72a440c39aa507936abfb1ed7d625e5ff3fd2
parent29767aaef67e78ca4ca80448725a4183146e463a
guix-package: When rolling back to nothingness, point to the empty profile.

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

* guix-package.in (roll-back): Check whether PROFILE is valid using
  `file-exists?'.  When NUMBER is zero, just emit a notice.  When
  PREVIOUS-NUMBER is zero and PREVIOUS-PROFILE does not exist, build the
  empty profile, and link to it.
* tests/guix-package.sh: Add tests.
* doc/guix.texi (Invoking guix-package): Document the new behavior.
doc/guix.texi
guix-package.in
tests/guix-package.sh