[commit: packages/Cabal] ghc-head: Don't pass --sysconfdir to setup scripts compiled against Cabal < 1.17. (1f890f8)
git at git.haskell.org
git at git.haskell.org
Mon Aug 26 23:31:13 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=1f890f8ff4b1d616d76c41348ddb7b2e29864131
>---------------------------------------------------------------
commit 1f890f8ff4b1d616d76c41348ddb7b2e29864131
Author: Mikhail Glushenkov <mikhail.glushenkov at gmail.com>
Date: Fri Aug 23 17:34:38 2013 +0200
Don't pass --sysconfdir to setup scripts compiled against Cabal < 1.17.
Fixes #1433.
>---------------------------------------------------------------
1f890f8ff4b1d616d76c41348ddb7b2e29864131
cabal-install/Distribution/Client/Setup.hs | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/cabal-install/Distribution/Client/Setup.hs b/cabal-install/Distribution/Client/Setup.hs
index 113a579..0c82ab8 100644
--- a/cabal-install/Distribution/Client/Setup.hs
+++ b/cabal-install/Distribution/Client/Setup.hs
@@ -60,7 +60,8 @@ import Distribution.Simple.Setup
, Flag(..), toFlag, fromFlag, flagToMaybe, flagToList
, optionVerbosity, boolOpt, trueArg, falseArg )
import Distribution.Simple.InstallDirs
- ( PathTemplate, toPathTemplate, fromPathTemplate )
+ ( PathTemplate, InstallDirs(sysconfdir)
+ , toPathTemplate, fromPathTemplate )
import Distribution.Version
( Version(Version), anyVersion, thisVersion )
import Distribution.Package
@@ -249,8 +250,10 @@ filterConfigureFlags flags cabalLibVersion
-- A no-op that silences the "pattern match is non-exhaustive" warning.
| otherwise = flags
where
- -- Cabal < 1.17.0 doesn't know about --extra-prog-path.
- flags_1_17_0 = flags { configProgramPathExtra = [] }
+ -- Cabal < 1.17.0 doesn't know about --extra-prog-path and --sysconfdir.
+ flags_1_17_0 = flags { configProgramPathExtra = []
+ , configInstallDirs = configInstallDirs_1_17_0}
+ configInstallDirs_1_17_0 = (configInstallDirs flags) { sysconfdir = NoFlag }
-- Cabal < 1.14.0 doesn't know about --disable-benchmarks.
flags_1_14_0 = flags_1_17_0 { configBenchmarks = NoFlag }
-- Cabal < 1.10.0 doesn't know about --disable-tests.
More information about the ghc-commits
mailing list