1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 13:10:33 +02:00

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.
This commit is contained in:
Ludovic Courtès
2013-01-27 17:18:55 +01:00
parent 29767aaef6
commit d9307267b3
3 changed files with 39 additions and 11 deletions

View File

@@ -509,6 +509,11 @@ the last transaction.
When combined with options such as @code{--install}, roll back occurs
before any other actions.
When rolling back from the first generation that actually contains
installed packages, the profile is made to point to the @dfn{empty
profile}, also known as @dfn{profile zero}---i.e., it contains no files
apart from its own meta-data.
@item --profile=@var{profile}
@itemx -p @var{profile}
Use @var{profile} instead of the user's default profile.