[commit: packages/Cabal] ghc-head: Print a notice when 'install -j' is used inside a sandbox. (d9b40dc)

git at git.haskell.org git at git.haskell.org
Mon Aug 26 23:26:48 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=d9b40dc8538b399eb15f8894b418898b3f610e42

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

commit d9b40dc8538b399eb15f8894b418898b3f610e42
Author: Mikhail Glushenkov <mikhail.glushenkov at gmail.com>
Date:   Wed Jun 5 23:01:49 2013 +0200

    Print a notice when 'install -j' is used inside a sandbox.
    
    With 'install -j' it can be a bit hard to tell where the packages are
    installed. This will be reworked once we get a unified dynamic UI for 'install'.


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

d9b40dc8538b399eb15f8894b418898b3f610e42
 cabal-install/Distribution/Client/Install.hs |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/cabal-install/Distribution/Client/Install.hs b/cabal-install/Distribution/Client/Install.hs
index 362b656..31b6ada 100644
--- a/cabal-install/Distribution/Client/Install.hs
+++ b/cabal-install/Distribution/Client/Install.hs
@@ -70,7 +70,8 @@ import Distribution.Client.Config
 import Distribution.Client.Sandbox.Timestamp
          ( withUpdateTimestamps )
 import Distribution.Client.Sandbox.Types
-         ( SandboxPackageInfo(..), UseSandbox(..), isUseSandbox )
+         ( SandboxPackageInfo(..), UseSandbox(..), isUseSandbox
+         , whenUsingSandbox )
 import Distribution.Client.Tar (extractTarGzFile)
 import Distribution.Client.Types as Source
 import Distribution.Client.BuildReports.Types
@@ -847,6 +848,12 @@ performInstallations verbosity
    globalFlags, configFlags, configExFlags, installFlags, haddockFlags)
   installedPkgIndex installPlan = do
 
+  -- With 'install -j' it can be a bit hard to tell whether a sandbox is used.
+  whenUsingSandbox useSandbox $ \sandboxDir ->
+    when parallelBuild $
+      notice verbosity $ "Notice: installing into a sandbox located at "
+                         ++ sandboxDir
+
   jobControl   <- if parallelBuild then newParallelJobControl
                                    else newSerialJobControl
   buildLimit   <- newJobLimit numJobs





More information about the ghc-commits mailing list