raco pkg: fix path problems with updating a clone-linked package

This commit is contained in:
Matthew Flatt 2014-12-07 07:31:24 -07:00
parent 1cf985031d
commit 9c75238cf2
3 changed files with 6 additions and 3 deletions

View File

@ -295,7 +295,7 @@
" Your current installation is a directory link, and the directory might\n"
" be a Git repostory checkout, but the package system doesn't know that.\n"
" If so, try\n"
" cd " (simple-form-path
" cd " (simplify-path
(path->complete-path (cadr current-orig-pkg) (pkg-installed-dir)))
"\n"
" raco pkg update --clone . <repository-URL>")]

View File

@ -1052,7 +1052,10 @@
(if (eq? 'clone (car orig-pkg))
(values (caddr orig-pkg)
'clone
(enclosing-path-for-repo (caddr orig-pkg) (cadr orig-pkg)))
(enclosing-path-for-repo (caddr orig-pkg)
(path->complete-path
(cadr orig-pkg)
(pkg-installed-dir))))
;; It would be better if the type were preseved
;; from install time, but we always make the
;; URL unambigious:

View File

@ -51,7 +51,7 @@
(define-values (host port repo branch path)
(split-git-or-hub-url (string->url url-str)))
(let loop ([path path]
[in-repo-dir in-repo-dir])
[in-repo-dir (simplify-path in-repo-dir)])
(cond
[(null? path) in-repo-dir]
[else