[commit: packages/Cabal] ghc-head: Don't completely override 'local-repo' in 'cabal.sandbox.config'. (b881981)
git at git.haskell.org
git at git.haskell.org
Mon Aug 26 23:29:07 CEST 2013
Repository : ssh://git@git.haskell.org/Cabal
On branch : ghc-head
Link : http://git.haskell.org/?p=packages/Cabal.git;a=commit;h=b8819818f31e29d9b1d64851acf9914a3cfd2843
>---------------------------------------------------------------
commit b8819818f31e29d9b1d64851acf9914a3cfd2843
Author: Mikhail Glushenkov <mikhail.glushenkov at gmail.com>
Date: Sat Jul 27 17:26:40 2013 +0200
Don't completely override 'local-repo' in 'cabal.sandbox.config'.
Instead, just append '/path/to/.cabal-sandbox/packages' at the end.
See the discussion in #1402.
>---------------------------------------------------------------
b8819818f31e29d9b1d64851acf9914a3cfd2843
cabal-install/Distribution/Client/Sandbox.hs | 5 +----
cabal-install/Distribution/Client/Sandbox/PackageEnvironment.hs | 6 +-----
2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/cabal-install/Distribution/Client/Sandbox.hs b/cabal-install/Distribution/Client/Sandbox.hs
index c99592d..5c21fe5 100644
--- a/cabal-install/Distribution/Client/Sandbox.hs
+++ b/cabal-install/Distribution/Client/Sandbox.hs
@@ -196,10 +196,7 @@ tryGetIndexFilePath' globalFlags = do
case paths of
[] -> die $ "Distribution.Client.Sandbox.tryGetIndexFilePath: " ++
"no local repos found. " ++ checkConfiguration
- [p] -> return $ p </> Index.defaultIndexFileName
- _ -> die $ "Distribution.Client.Sandbox.tryGetIndexFilePath: " ++
- "too many local repos found. " ++ checkConfiguration
-
+ _ -> return $ (last paths) </> Index.defaultIndexFileName
where
checkConfiguration = "Please check your configuration ('"
++ userPackageEnvironmentFile ++ "')."
diff --git a/cabal-install/Distribution/Client/Sandbox/PackageEnvironment.hs b/cabal-install/Distribution/Client/Sandbox/PackageEnvironment.hs
index c9d6eb1..db0a614 100644
--- a/cabal-install/Distribution/Client/Sandbox/PackageEnvironment.hs
+++ b/cabal-install/Distribution/Client/Sandbox/PackageEnvironment.hs
@@ -214,10 +214,7 @@ overrideSandboxSettings :: PackageEnvironment -> PackageEnvironment ->
overrideSandboxSettings pkgEnv0 pkgEnv =
pkgEnv {
pkgEnvSavedConfig = mappendedConf {
- savedGlobalFlags = (savedGlobalFlags mappendedConf) {
- globalLocalRepos = globalLocalRepos pkgEnvGlobalFlags
- }
- , savedConfigureFlags = (savedConfigureFlags mappendedConf) {
+ savedConfigureFlags = (savedConfigureFlags mappendedConf) {
configPackageDBs = configPackageDBs pkgEnvConfigureFlags
}
, savedInstallFlags = (savedInstallFlags mappendedConf) {
@@ -229,7 +226,6 @@ overrideSandboxSettings pkgEnv0 pkgEnv =
where
pkgEnvConf = pkgEnvSavedConfig pkgEnv
mappendedConf = (pkgEnvSavedConfig pkgEnv0) `mappend` pkgEnvConf
- pkgEnvGlobalFlags = savedGlobalFlags pkgEnvConf
pkgEnvConfigureFlags = savedConfigureFlags pkgEnvConf
pkgEnvInstallFlags = savedInstallFlags pkgEnvConf
More information about the ghc-commits
mailing list