summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-07-13 14:33:11 +0200
committerLudovic Courtès <ludo@gnu.org>2018-07-13 17:28:39 +0200
commitbc6e291ef0b3c71c07e50d88d7764e5dd334e8b1 (patch)
treef6b08da3fd857738de0b51f6746d9c864da25953 /tests
parent0bc2d3e42b8800e875f24973f999739297f1f502 (diff)
guix package: Use relative symlinks to generations.
Reported by Roel Janssen <roel@gnu.org> at <https://lists.gnu.org/archive/html/guix-devel/2018-07/msg00036.html>. * guix/profiles.scm (switch-to-generation): Use (basename generation) as the symlink target. * guix/scripts/package.scm (build-and-use-profile): Likewise, use (basename name) as the symlink target. * tests/guix-package.sh: Adjust --roll-back test accordingly. Add explicitly test with '-p foo/prof'.
Diffstat (limited to 'tests')
-rw-r--r--tests/guix-package.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/guix-package.sh b/tests/guix-package.sh
index 3b3fa35cd82..cef3b3452e3 100644
--- a/tests/guix-package.sh
+++ b/tests/guix-package.sh
@@ -185,6 +185,16 @@ grep -E 'emacs[[:blank:]]+42\.5\.9rc7[[:blank:]]+.*-emacs-42.5.9rc7' \
185rm "$emacs_tarball" "$tmpfile" 185rm "$emacs_tarball" "$tmpfile"
186rmdir "$module_dir" 186rmdir "$module_dir"
187 187
188# Profiles with a relative file name. Make sure we don't create dangling
189# symlinks--see bug report at
190# <https://lists.gnu.org/archive/html/guix-devel/2018-07/msg00036.html>.
191mkdir -p "$module_dir/foo"
192( cd "$module_dir" ; \
193 guix package --bootstrap -i guile-bootstrap -p foo/prof )
194test -f "$module_dir/foo/prof/bin/guile"
195rm "$module_dir/foo"/*
196rmdir "$module_dir/foo"
197rmdir "$module_dir"
188 198
189# 199#
190# Try with the default profile. 200# Try with the default profile.
@@ -215,7 +225,7 @@ do
215 guix package --bootstrap --roll-back 225 guix package --bootstrap --roll-back
216 ! test -f "$HOME/.guix-profile/bin" 226 ! test -f "$HOME/.guix-profile/bin"
217 ! test -f "$HOME/.guix-profile/lib" 227 ! test -f "$HOME/.guix-profile/lib"
218 test "`readlink "$default_profile"`" = "$default_profile-0-link" 228 test "`readlink "$default_profile"`" = "`basename $default_profile-0-link`"
219done 229done
220 230
221# Check whether '-p ~/.guix-profile' makes any difference. 231# Check whether '-p ~/.guix-profile' makes any difference.