diff --git a/collects/planet/config.ss b/collects/planet/config.ss index cb8f3a1849..2a1ed6565a 100644 --- a/collects/planet/config.ss +++ b/collects/planet/config.ss @@ -8,7 +8,7 @@ (PLANET-CODE-VERSION "300") (PLANET-DIR (if (getenv "PLTPLANETDIR") (string->path (getenv "PLTPLANETDIR")) - (build-path (find-system-path 'addon-dir) "planet" (PLANET-CODE-VERSION)))) + (build-path (find-system-path 'addon-dir) "planet" (PLANET-CODE-VERSION) (version)))) (CACHE-DIR (build-path (PLANET-DIR) "cache")) (LINKAGE-FILE (build-path (PLANET-DIR) "LINKAGE")) (LOGGING-ENABLED? #t) diff --git a/collects/planet/planet-archives.ss b/collects/planet/planet-archives.ss index 130bef77fe..5b82924a25 100644 --- a/collects/planet/planet-archives.ss +++ b/collects/planet/planet-archives.ss @@ -1,8 +1,9 @@ (module planet-archives mzscheme (require "private/planet-shared.ss" + (lib "file.ss") "config.ss") - (provide repository-tree get-installed-planet-archives) + (provide repository-tree get-installed-planet-archives get-planet-cache-path) (define (repository-tree) (define (id x) x) @@ -29,4 +30,12 @@ min))) x)) (repository-tree) - 3)))) + 3))) + + ;; get-planet-cache-path : -> path[absolute, file] + ;; the path to the cache.ss file for the planet installation + ;; SIDE EFFECT: creates the directory if it doesn't already exist + (define (get-planet-cache-path) + (let ((path (build-path (PLANET-DIR) "cache.ss"))) + (make-directory* (PLANET-DIR)) + path))) diff --git a/collects/setup/getinfo.ss b/collects/setup/getinfo.ss index 194ba8e8e7..82c05014f3 100644 --- a/collects/setup/getinfo.ss +++ b/collects/setup/getinfo.ss @@ -5,7 +5,9 @@ (lib "list.ss") (lib "etc.ss") - (lib "contract.ss")) + (lib "contract.ss") + + (lib "planet-archives.ss" "planet")) (define info? (opt-> (symbol?) ((-> any/c)) any/c)) (define path-or-string? (lambda (x) (or (path? x) (string? x)))) @@ -23,7 +25,7 @@ ;; in addition to infodomain/compiled/cache.ss, getinfo will look in this ;; file to find mappings. PLaneT uses this to put info about installed ;; planet packages. - (define user-infotable (build-path (find-system-path 'addon-dir) "cache.ss")) + (define user-infotable (get-planet-cache-path)) (define (get-info coll-path) (let* ([coll-path (map (lambda (x) (if (path? x) (path->string x) x)) coll-path)] diff --git a/collects/setup/setup-unit.ss b/collects/setup/setup-unit.ss index c990e59fb1..eda6f79be2 100644 --- a/collects/setup/setup-unit.ss +++ b/collects/setup/setup-unit.ss @@ -162,7 +162,8 @@ path name info - (build-path (find-system-path 'addon-dir) "cache.ss") + #;(build-path (find-system-path 'addon-dir) "cache.ss") + (get-planet-cache-path) (list `(planet ,owner ,pkg-file ,@extra-path) maj min))))) ;; this is an awful hack