From c651826f35ffe9e31913b36b3e4e53494e797612 Mon Sep 17 00:00:00 2001 From: Jacob Matthews Date: Fri, 4 Aug 2006 04:43:32 +0000 Subject: [PATCH] Fixed a couple bugs in the error-handling and command-line support for the new uninstalled-package-cache feature svn: r3952 --- collects/planet/resolver.ss | 5 +++-- collects/planet/util.ss | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/collects/planet/resolver.ss b/collects/planet/resolver.ss index 8bd528c1ea..5afebbb39e 100644 --- a/collects/planet/resolver.ss +++ b/collects/planet/resolver.ss @@ -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?) diff --git a/collects/planet/util.ss b/collects/planet/util.ss index 1ea018cd55..7b928c7fd6 100644 --- a/collects/planet/util.ss +++ b/collects/planet/util.ss @@ -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