From 67b79614643ee54d7f65170e36a1a380100601bf Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Fri, 20 Aug 2010 10:32:11 -0600 Subject: [PATCH] Making the distribution checker agnostic to the actual base name of the plt root --- collects/meta/checker.rkt | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/collects/meta/checker.rkt b/collects/meta/checker.rkt index fd6ab3c647..0601bc512d 100644 --- a/collects/meta/checker.rkt +++ b/collects/meta/checker.rkt @@ -69,22 +69,26 @@ (provide get-tree) ;; path -> tree ;; Returns the tree with path (a string with no "/"s) at its root. -(define (get-tree path) +(define (get-tree path fake-path) (define base (regexp-replace #rx"/$" (path->string (cd)) "")) - (let loop ([name path] [path ""]) + (let loop ([name path] [fake-name fake-path] [path ""] [fake-path ""]) (cond [(or (file-exists? name) (link-exists? name)) - (let ([path (concat path name)]) - (prop-set! path 'base base) - (prop-set! path 'name name) - path)] + (let ([path (concat path name)] + [fake-path (concat fake-path fake-name)]) + (prop-set! fake-path 'base base) + (prop-set! fake-path 'name name) + (prop-set! fake-path 'real path) + fake-path)] [(directory-exists? name) - (let ([path (concat path name "/")]) - (prop-set! path 'base base) - (prop-set! path 'name name) + (let ([path (concat path name "/")] + [fake-path (concat fake-path fake-name "/")]) + (prop-set! fake-path 'base base) + (prop-set! fake-path 'name name) + (prop-set! fake-path 'real path) (parameterize ([cd name]) - (cons path (map (lambda (name) (loop name path)) - (dir-list)))))] - [else (error 'get-tree "strange entry: ~a/~a" + (cons fake-path (map (lambda (name) (loop name name path fake-path)) + (dir-list)))))] + [else (error 'get-tree/base "strange entry: ~a/~a" (path->string (cd)) name)]))) (provide tree-path) @@ -469,7 +473,7 @@ (if (pair? tree) (for-each loop (cdr tree)) (parameterize ([cd (prop-get tree 'base)]) - (prop-set! tree 'contents (read-depfile tree))))) + (prop-set! tree 'contents (read-depfile (prop-get tree 'real)))))) (dprintf " done.\n") (set! add-dependency-contents! void)) @@ -562,7 +566,7 @@ (dprintf "Scanning main tree...") (set! *racket-tree* (let loop ([tree (parameterize ([cd racket-base/]) - (get-tree racket/-name))] + (get-tree racket/-name "racket"))] [trees (apply append *platform-tree-lists*)]) (if (null? trees) (tree-filter '(not junk) tree)