[commit: packages/Cabal] ghc-head: Reconfigure on modified 'cabal.config' even when there's no sandbox. (571891c)

git at git.haskell.org git at git.haskell.org
Fri Sep 13 17:55:04 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=571891c27dd63225d8ca13b164514c7ac156ce85

>---------------------------------------------------------------

commit 571891c27dd63225d8ca13b164514c7ac156ce85
Author: Mikhail Glushenkov <mikhail.glushenkov at gmail.com>
Date:   Sat Sep 7 17:06:56 2013 +0200

    Reconfigure on modified 'cabal.config' even when there's no sandbox.
    
    See #1485.


>---------------------------------------------------------------

571891c27dd63225d8ca13b164514c7ac156ce85
 cabal-install/Main.hs |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/cabal-install/Main.hs b/cabal-install/Main.hs
index aeefa8a..89e9089 100644
--- a/cabal-install/Main.hs
+++ b/cabal-install/Main.hs
@@ -91,8 +91,7 @@ import Distribution.Client.Sandbox.PackageEnvironment
                                               (setPackageDB
                                               ,userPackageEnvironmentFile)
 import Distribution.Client.Sandbox.Timestamp  (maybeAddCompilerTimestampRecord)
-import Distribution.Client.Sandbox.Types      (UseSandbox(..), isUseSandbox
-                                              ,whenUsingSandbox)
+import Distribution.Client.Sandbox.Types      (UseSandbox(..), whenUsingSandbox)
 import Distribution.Client.Init               (initCabal)
 import qualified Distribution.Client.Win32SelfUpgrade as Win32SelfUpgrade
 
@@ -445,11 +444,10 @@ reconfigure verbosity distPref     addConfigFlags extraArgs globalFlags
           return (useSandbox, NoDepsReinstalled)
 
       -- Is the @cabal.config@ file newer than @dist/setup.config@? Then we need
-      -- to force reconfigure.
+      -- to force reconfigure. Note that it's possible to use @cabal.config@
+      -- even without sandboxes.
       isUserPackageEnvironmentFileNewer <-
-        if isUseSandbox useSandbox
-        then userPackageEnvironmentFile `existsAndIsMoreRecentThan` buildConfig
-        else return False
+        userPackageEnvironmentFile `existsAndIsMoreRecentThan` buildConfig
 
       -- Determine whether we need to reconfigure and which message to show to
       -- the user if that is the case.




More information about the ghc-commits mailing list