allow environment variable-based spec of the url to download planet packages from

svn: r16521
This commit is contained in:
Robby Findler 2009-11-03 17:36:45 +00:00
parent b49896f2f7
commit 82b9a9f4dd
2 changed files with 13 additions and 8 deletions

View File

@ -4,11 +4,12 @@
(PLANET-SERVER-NAME "planet.plt-scheme.org") (PLANET-SERVER-NAME "planet.plt-scheme.org")
(PLANET-SERVER-PORT 270) (PLANET-SERVER-PORT 270)
(PLANET-CODE-VERSION "300") (PLANET-CODE-VERSION "300")
(PLANET-BASE-DIR (if (getenv "PLTPLANETDIR") (PLANET-BASE-DIR (let ([plt-planet-dir-env-var (getenv "PLTPLANETDIR")])
(string->path (getenv "PLTPLANETDIR")) (if plt-planet-dir-env-var
(build-path (find-system-path 'addon-dir) (string->path plt-planet-dir-env-var)
"planet" (build-path (find-system-path 'addon-dir)
(PLANET-CODE-VERSION)))) "planet"
(PLANET-CODE-VERSION)))))
(PLANET-DIR (build-path (PLANET-BASE-DIR) (version))) (PLANET-DIR (build-path (PLANET-BASE-DIR) (version)))
(CACHE-DIR (build-path (PLANET-DIR) "cache")) (CACHE-DIR (build-path (PLANET-DIR) "cache"))
(UNINSTALLED-PACKAGE-CACHE (build-path (PLANET-BASE-DIR) "packages")) (UNINSTALLED-PACKAGE-CACHE (build-path (PLANET-BASE-DIR) "packages"))
@ -19,6 +20,8 @@
(DEFAULT-PACKAGE-LANGUAGE (version)) (DEFAULT-PACKAGE-LANGUAGE (version))
(USE-HTTP-DOWNLOADS? #t) (USE-HTTP-DOWNLOADS? #t)
(HTTP-DOWNLOAD-SERVLET-URL "http://planet.plt-scheme.org/servlets/planet-servlet.ss") (HTTP-DOWNLOAD-SERVLET-URL (let ([plt-planet-url-env-var (getenv "PLTPLANETURL")])
(or plt-planet-url-env-var
"http://planet.plt-scheme.org/servlets/planet-servlet.ss")))
(PLANET-ARCHIVE-FILTER #f))) (PLANET-ARCHIVE-FILTER #f)))

View File

@ -518,8 +518,10 @@ this parameter to @scheme[#f] is not recommended.}
@defparam[HTTP-DOWNLOAD-SERVLET-URL url string?]{ @defparam[HTTP-DOWNLOAD-SERVLET-URL url string?]{
The URL for the servlet that will provide PLaneT packages if The URL for the servlet that will provide PLaneT packages if
@scheme[USE-HTTP-DOWNLOADS?] is @scheme[#t], represented as a string. The default @scheme[USE-HTTP-DOWNLOADS?] is @scheme[#t], represented as a string.
value is @scheme["http://planet.plt-scheme.org/servlets/planet-servlet.ss"].} This defaults to the value of the @indexed-envvar{PLTPLANETURL} environment
variable if it is set and otherwise is
@scheme["http://planet.plt-scheme.org/servlets/planet-servlet.ss"].}
@defparam[PLANET-SERVER-NAME host string?]{ @defparam[PLANET-SERVER-NAME host string?]{
The name of the PLaneT server to which the client should connect if The name of the PLaneT server to which the client should connect if