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'.
This commit is contained in:
Ludovic Courtès 2018-07-13 14:33:11 +02:00
parent 0bc2d3e42b
commit bc6e291ef0
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
3 changed files with 13 additions and 3 deletions

View file

@ -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)