diff --git a/guix/profiles.scm b/guix/profiles.scm index d2a794b18..f34f4fcff 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -1521,7 +1521,7 @@ the generation that was current before switching." (profile profile) (generation number))))) (else - (switch-symlinks profile generation) + (switch-symlinks profile (basename generation)) current)))) (define (switch-to-previous-generation profile) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 29829f52c..b38a55d01 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -190,7 +190,7 @@ do not treat collisions in MANIFEST as an error." (let* ((entries (manifest-entries manifest)) (count (length entries))) (switch-symlinks name prof) - (switch-symlinks profile name) + (switch-symlinks profile (basename name)) (unless (string=? profile %current-profile) (register-gc-root store name)) (format #t (N_ "~a package in profile~%" diff --git a/tests/guix-package.sh b/tests/guix-package.sh index 3b3fa35cd..3833b568a 100644 --- a/tests/guix-package.sh +++ b/tests/guix-package.sh @@ -215,7 +215,7 @@ do guix package --bootstrap --roll-back ! test -f "$HOME/.guix-profile/bin" ! test -f "$HOME/.guix-profile/lib" - test "`readlink "$default_profile"`" = "$default_profile-0-link" + test "`readlink "$default_profile"`" = "`basename $default_profile-0-link`" done # Check whether '-p ~/.guix-profile' makes any difference.