diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-01-17 22:41:47 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-01-17 22:42:39 +0100 |
commit | 9241172c9dc41ac026f05837dc6f089b1a3745e0 (patch) | |
tree | ede4741b6a1ae27286b450c716212557d3937005 /tests | |
parent | 24e262f086980a13d9d0a27615ed7eaec4aacbff (diff) | |
download | guix-9241172c9dc41ac026f05837dc6f089b1a3745e0.tar.gz |
guix-package: Allow `--roll-back' to skip missing generations.
* guix-package.in (profile-numbers): New procedure. (latest-profile-number): Use it. (previous-profile-number): New procedure. (roll-back): Use it lieu of `1-'. Check whether PREVIOUS-NUMBER is zero, and raise an error when it is. * tests/guix-package.sh: Test whether we can roll back over a "hole".
Diffstat (limited to 'tests')
-rw-r--r-- | tests/guix-package.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/guix-package.sh b/tests/guix-package.sh index fd778f4f4f..fc80939646 100644 --- a/tests/guix-package.sh +++ b/tests/guix-package.sh @@ -95,6 +95,12 @@ then guix-package --bootstrap -p "$profile" --roll-back -i "$boot_guile" test "`readlink_base "$profile"`" = "$profile-5-link" test -x "$profile/bin/guile" && test -x "$profile/bin/make" + + # Make a "hole" in the list of generations, and make sure we can + # roll back "over" it. + rm "$profile-4-link" + guix-package --bootstrap -p "$profile" --roll-back + test "`readlink_base "$profile"`" = "$profile-3-link" fi # Make sure the `:' syntax works. |