changed planet search order, now uninstalled packages are only consulted if an attempt to download from the network fails.
svn: r5638
This commit is contained in:
parent
c2e4fcd60d
commit
844ed2d48f
|
@ -80,8 +80,10 @@ cache, which contains compiled files and is specific to each
|
||||||
particular version of PLT Scheme, the uninstalled package cache is
|
particular version of PLT Scheme, the uninstalled package cache is
|
||||||
shared by all versions of PLT Scheme that use the same package
|
shared by all versions of PLT Scheme that use the same package
|
||||||
repository, and it is searched if a package is not installed in the
|
repository, and it is searched if a package is not installed in the
|
||||||
primary cache. This behavior is intended to primarily benefit users
|
primary cache and cannot be downloaded from the central PLaneT repository
|
||||||
who upgrade their PLT Scheme installations frequently.
|
(for instance due to a loss of Internet connectivity). This behavior
|
||||||
|
is intended to primarily benefit users who upgrade their PLT Scheme
|
||||||
|
installations frequently.
|
||||||
|
|
||||||
> (LINKAGE-FILE) file-string
|
> (LINKAGE-FILE) file-string
|
||||||
> (LINKAGE-FILE file-string) -> void
|
> (LINKAGE-FILE file-string) -> void
|
||||||
|
@ -235,6 +237,18 @@ the requirement. The server then finds the newest matching package
|
||||||
and sends it back to the client, which then installs it and uses
|
and sends it back to the client, which then installs it and uses
|
||||||
it to satisfy the original requirement.
|
it to satisfy the original requirement.
|
||||||
|
|
||||||
|
4. Cached installation archive
|
||||||
|
|
||||||
|
If the remote server cannot be contacted (or fails in any way to
|
||||||
|
deliver an acceptable package), the PLaneT client consults the
|
||||||
|
uninstalled-packages cache, a cache of all previously-downloaded
|
||||||
|
packages, even those that are not currently installed. PLT Scheme
|
||||||
|
users who frequently upgrade their installations may have many
|
||||||
|
packages downloaded but not installed at any given time; this step
|
||||||
|
is intended to ensure that these users can still run programs even
|
||||||
|
if they temporarily lose network connection.
|
||||||
|
|
||||||
|
|
||||||
_The planet command-line tool_
|
_The planet command-line tool_
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
|
|
|
@ -410,6 +410,12 @@ attempted to load version ~a.~a while version ~a.~a was already loaded"
|
||||||
(define (get-package-from-cache pkg-spec)
|
(define (get-package-from-cache pkg-spec)
|
||||||
(lookup-package pkg-spec))
|
(lookup-package pkg-spec))
|
||||||
|
|
||||||
|
;; get/uninstalled-cache-dummy : pkg-getter
|
||||||
|
;; always fails, but records the package to the uninstalled package cache
|
||||||
|
;; upon the success of some other getter later in the chain.
|
||||||
|
(define (get/uninstalled-cache-dummy module-spec pkg-spec success-k failure-k)
|
||||||
|
(failure-k save-to-uninstalled-pkg-cache! void (λ (x) x)))
|
||||||
|
|
||||||
; get/uninstalled-cache : pkg-getter
|
; get/uninstalled-cache : pkg-getter
|
||||||
; note: this does not yet work with minimum-required-version specifiers
|
; note: this does not yet work with minimum-required-version specifiers
|
||||||
; if you install a package and then use an older mzscheme
|
; if you install a package and then use an older mzscheme
|
||||||
|
@ -426,10 +432,7 @@ attempted to load version ~a.~a while version ~a.~a was already loaded"
|
||||||
pkg-spec
|
pkg-spec
|
||||||
(pkg-maj p)
|
(pkg-maj p)
|
||||||
(pkg-min p)))
|
(pkg-min p)))
|
||||||
(failure-k
|
(failure-k void void (λ (x) x)))))
|
||||||
save-to-uninstalled-pkg-cache!
|
|
||||||
void
|
|
||||||
(λ (x) x)))))
|
|
||||||
|
|
||||||
;; save-to-uninstalled-pkg-cache! : uninstalled-pkg -> path[file]
|
;; save-to-uninstalled-pkg-cache! : uninstalled-pkg -> path[file]
|
||||||
;; copies the given uninstalled package into the uninstalled-package cache,
|
;; copies the given uninstalled package into the uninstalled-package cache,
|
||||||
|
@ -714,8 +717,9 @@ attempted to load version ~a.~a while version ~a.~a was already loaded"
|
||||||
(list
|
(list
|
||||||
get/linkage
|
get/linkage
|
||||||
get/installed-cache
|
get/installed-cache
|
||||||
get/uninstalled-cache
|
get/uninstalled-cache-dummy
|
||||||
get/server)))
|
get/server
|
||||||
|
get/uninstalled-cache)))
|
||||||
|
|
||||||
|
|
||||||
; ============================================================
|
; ============================================================
|
||||||
|
|
Loading…
Reference in New Issue
Block a user