Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal On branch : master
http://hackage.haskell.org/trac/ghc/changeset/7fa5e2a7e36eab6b954328f127ff05ba335e9092 >--------------------------------------------------------------- commit 7fa5e2a7e36eab6b954328f127ff05ba335e9092 Author: Duncan Coutts <[email protected]> Date: Sun Oct 14 17:10:35 2007 +0000 Improve the error message we get when missing the package index file >--------------------------------------------------------------- cabal-install/Hackage/Config.hs | 13 +++++-------- 1 files changed, 5 insertions(+), 8 deletions(-) diff --git a/cabal-install/Hackage/Config.hs b/cabal-install/Hackage/Config.hs index a8e88a8..c1a3c6a 100644 --- a/cabal-install/Hackage/Config.hs +++ b/cabal-install/Hackage/Config.hs @@ -93,14 +93,11 @@ readRepoIndex :: ConfigFlags -> Repo -> IO [PkgInfo] readRepoIndex cfg repo = do let indexFile = repoCacheDir cfg repo </> "00-index.tar" fmap (parseRepoIndex repo) (BS.readFile indexFile) - `catch` (\e - -> do hPutStrLn stderr ("Warning: Problem opening package list '" - ++ indexFile ++ "'.") - case e of - IOException ioe | isDoesNotExistError ioe -> - hPutStrLn stderr "File doesn't exist. Run 'cabal-install update' to create the package list." - _ -> hPutStrLn stderr ("Error: " ++ (show e)) - return []) + `catch` (\e -> do case e of + IOException ioe | isDoesNotExistError ioe -> + hPutStrLn stderr "The package list does not exist. Run 'cabal update' to download it." + _ -> hPutStrLn stderr ("Error: " ++ show e) + return []) parseRepoIndex :: Repo -> ByteString -> [PkgInfo] parseRepoIndex repo s = _______________________________________________ Cvs-libraries mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-libraries
