From 9c75238cf2955ca9aa9332453cebd1fe366117f5 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 7 Dec 2014 07:31:24 -0700 Subject: [PATCH] raco pkg: fix path problems with updating a clone-linked package --- racket/collects/pkg/private/clone-path.rkt | 2 +- racket/collects/pkg/private/install.rkt | 5 ++++- racket/collects/pkg/private/repo-path.rkt | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/racket/collects/pkg/private/clone-path.rkt b/racket/collects/pkg/private/clone-path.rkt index 0cb49ae9e6..8b2746fbcc 100644 --- a/racket/collects/pkg/private/clone-path.rkt +++ b/racket/collects/pkg/private/clone-path.rkt @@ -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 . ")] diff --git a/racket/collects/pkg/private/install.rkt b/racket/collects/pkg/private/install.rkt index 75f627497c..c13a64f60c 100644 --- a/racket/collects/pkg/private/install.rkt +++ b/racket/collects/pkg/private/install.rkt @@ -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: diff --git a/racket/collects/pkg/private/repo-path.rkt b/racket/collects/pkg/private/repo-path.rkt index 9f3981cc53..acc9d91e46 100644 --- a/racket/collects/pkg/private/repo-path.rkt +++ b/racket/collects/pkg/private/repo-path.rkt @@ -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