[commit: Cabal] master: Don't include the default repo when loading the config file (0862a12)
Ian Lynagh
igloo at earth.li
Fri Jun 24 01:54:52 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/0862a12e04af907d4f0f3ce63001eabf54bdbc70
>---------------------------------------------------------------
commit 0862a12e04af907d4f0f3ce63001eabf54bdbc70
Author: Duncan Coutts <duncan at haskell.org>
Date: Tue Jun 3 15:18:44 2008 +0000
Don't include the default repo when loading the config file
So we don't end up downloading the index from hackage twice.
>---------------------------------------------------------------
cabal-install/Hackage/Config.hs | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/cabal-install/Hackage/Config.hs b/cabal-install/Hackage/Config.hs
index 9c10397..71eb92c 100644
--- a/cabal-install/Hackage/Config.hs
+++ b/cabal-install/Hackage/Config.hs
@@ -163,7 +163,7 @@ loadConfig verbosity configFile =
notice verbosity $ "Writing default configuration to " ++ configFile
writeDefaultConfigFile configFile defaultConf
return defaultConf
- Just inp -> case parseBasicStanza configFieldDescrs defaultConf inp of
+ Just inp -> case parseBasicStanza configFieldDescrs defaultConf' inp of
ParseOk ws conf ->
do when (not $ null ws) $ warn verbosity $
unlines (map (showPWarning configFile) ws)
@@ -173,6 +173,7 @@ loadConfig verbosity configFile =
++ configFile ++ ": " ++ showPError err
warn verbosity $ "Using default configuration."
return defaultConf
+ where defaultConf' = defaultConf { configRemoteRepos = [] }
writeDefaultConfigFile :: FilePath -> SavedConfig -> IO ()
writeDefaultConfigFile file cfg =
More information about the Cvs-libraries
mailing list