summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--guix-package.in5
-rw-r--r--tests/guix-package.sh14
2 files changed, 16 insertions, 3 deletions
diff --git a/guix-package.in b/guix-package.in
index 58d6c49501..85ac358555 100644
--- a/guix-package.in
+++ b/guix-package.in
@@ -208,9 +208,8 @@ all of PACKAGES, a list of name/version/output/path tuples."
   ;; XXX: Get the previous generation number from the manifest?
   (let* ((number           (profile-number profile))
          (previous-number  (previous-profile-number profile number))
-         (previous-profile (format #f "~a/~a-~a-link"
-                                   (dirname profile) profile
-                                   previous-number))
+         (previous-profile (format #f "~a-~a-link"
+                                   profile previous-number))
          (manifest         (string-append previous-profile "/manifest")))
 
     (define (switch-link)
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