From 9241172c9dc41ac026f05837dc6f089b1a3745e0 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 17 Jan 2013 22:41:47 +0100 Subject: 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". --- tests/guix-package.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/guix-package.sh') 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. -- cgit v1.2.3