Fixed a couple bugs in the error-handling and command-line

support for the new uninstalled-package-cache feature

svn: r3952
This commit is contained in:
Jacob Matthews 2006-08-04 04:43:32 +00:00
parent f02c4d7a80
commit c651826f35
2 changed files with 5 additions and 3 deletions

View File

@ -450,7 +450,7 @@ attempted to load version ~a.~a while version ~a.~a was already loaded"
; replace any existing error message with the server download error message
(failure-k void (λ (_) p))])))
; get-package-from-server : FULL-PKG-SPEC -> PKG-PROMISE | #f
; get-package-from-server : FULL-PKG-SPEC -> PKG-PROMISE | #f | string[error message]
; downloads the given package file from the PLaneT server and installs it in the
; uninstalled-packages cache, then returns a promise for it
(define (get-package-from-server pkg)
@ -459,7 +459,8 @@ attempted to load version ~a.~a while version ~a.~a was already loaded"
(let ([upkg (make-uninstalled-pkg path pkg maj min)])
(save-to-uninstalled-pkg-cache! upkg)
upkg)]
[(#f str) #f]))
[(#f str) (string-append "PLaneT could not find the requested package: " str)]
[(? string? s) (string-append "PLaneT could not download the requested package: " s)]))
(define (download-package pkg)
((if (USE-HTTP-DOWNLOADS?)

View File

@ -69,7 +69,8 @@
(clean-planet-package path (list owner name '() maj min))))
(erase-metadata p)
(delete-directory/files path)
(trim-directory (CACHE-DIR) path)))))
(trim-directory (CACHE-DIR) path)
#t))))
;; erase-metadata : pkg -> void
;; clears out any references to the given package in planet's metadata files