aboutsummaryrefslogtreecommitdiff
path: root/tests/guix-package.sh
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-01-22 22:35:16 +0100
committerLudovic Courtès <ludo@gnu.org>2013-01-22 22:35:16 +0100
commit67668155c5b3c4c37717404aa73f7224fced1d81 (patch)
tree634ab6aa5e94f15ad8b2e84b4dd4167a519a98c0 /tests/guix-package.sh
parent5401dd7595f558e759c82b1dede0c2fb687f296b (diff)
downloadgnu-guix-67668155c5b3c4c37717404aa73f7224fced1d81.tar
gnu-guix-67668155c5b3c4c37717404aa73f7224fced1d81.tar.gz
guix-package: Fix `--roll-back' when `--profile' is not passed.
* guix-package.in (roll-back): Fix file name of PREVIOUS-PROFILE, which could end up containing the dirname twice. Reported by Nikita and Andreas. * tests/guix-package.sh: Add test.
Diffstat (limited to 'tests/guix-package.sh')
-rw-r--r--tests/guix-package.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/guix-package.sh b/tests/guix-package.sh
index 7b7835dcaa..603ae98d74 100644
--- a/tests/guix-package.sh
+++ b/tests/guix-package.sh
@@ -109,7 +109,9 @@ guix-package --bootstrap -i "binutils:lib" -p "$profile" -n
# Check whether `--list-available' returns something sensible.
guix-package -A 'gui.*e' | grep guile
+#
# Try with the default profile.
+#
XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
export XDG_CACHE_HOME
@@ -122,6 +124,18 @@ guix-package --bootstrap -i "$boot_guile"
test -L "$HOME/.guix-profile"
test -f "$HOME/.guix-profile/bin/guile"
+if guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)' 2> /dev/null
+then
+ guix-package --bootstrap -i "$boot_make"
+ test -f "$HOME/.guix-profile/bin/make"
+ first_environment="`cd $HOME/.guix-profile ; pwd`"
+
+ guix-package --bootstrap --roll-back
+ test -f "$HOME/.guix-profile/bin/guile"
+ ! test -f "$HOME/.guix-profile/bin/make"
+ test "`cd $HOME/.guix-profile ; pwd`" = "$first_environment"
+fi
+
# Failed attempt to roll back.
if guix-package --bootstrap --roll-back;
then false; else true; fi