summary refs log tree commit diff
path: root/guix-package.in
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 /guix-package.in
parent5401dd7595f558e759c82b1dede0c2fb687f296b (diff)
downloadguix-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 'guix-package.in')
-rw-r--r--guix-package.in5
1 files changed, 2 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)