packages feed

cabal-install 1.18.0.1 → 1.18.0.2

raw patch · 9 files changed

+55/−82 lines, 9 filesdep ~process

Dependency ranges changed: process

Files

− Distribution/Client/Compat/Exception.hs
@@ -1,26 +0,0 @@-{-# LANGUAGE CPP #-}-module Distribution.Client.Compat.Exception (-  mask,-  mask_-  ) where---- We can't move these functions to Distribution.Compat.Exception because the--- usage of the MIN_VERSION_base macro breaks bootstrapping.--#if MIN_VERSION_base(4,3,0)--- it's much less of a headache if we re-export the "real" mask and mask_--- so there's never more than one definition to conflict-import Control.Exception (mask, mask_)-#else-import Control.Exception (block, unblock)-#endif--#if !MIN_VERSION_base(4,3,0)--- note: less polymorphic than 'real' mask, to avoid RankNTypes--- we don't need the full generality where we use it-mask :: ((IO a -> IO a) -> IO b) -> IO b-mask handler = block (handler unblock)--mask_ :: IO a -> IO a-mask_ = block-#endif
Distribution/Client/Compat/Semaphore.hs view
@@ -9,11 +9,9 @@  import Control.Concurrent.STM (TVar, atomically, newTVar, readTVar, retry,                                writeTVar)-import Control.Exception (onException)+import Control.Exception (mask_, onException) import Control.Monad (join, when) import Data.Typeable (Typeable)--import Distribution.Client.Compat.Exception (mask_)  -- | 'QSem' is a quantity semaphore in which the resource is aqcuired -- and released in units of one. It provides guaranteed FIFO ordering
Distribution/Client/Get.hs view
@@ -37,6 +37,8 @@ import qualified Distribution.Client.Tar as Tar (extractTarGzFile) import Distribution.Client.IndexUtils as IndexUtils         ( getSourcePackages )+import Distribution.Compat.Exception+        ( catchIO )  import Control.Exception          ( finally )@@ -51,8 +53,6 @@          ( mempty ) import Data.Ord          ( comparing )-import System.Cmd-         ( rawSystem ) import System.Directory          ( createDirectoryIfMissing, doesDirectoryExist, doesFileExist          , getCurrentDirectory, setCurrentDirectory@@ -62,7 +62,7 @@ import System.FilePath          ( (</>), (<.>), addTrailingPathSeparator ) import System.Process-         ( readProcessWithExitCode )+         ( rawSystem, readProcessWithExitCode )   -- | Entry point for the 'cabal get' command.@@ -204,7 +204,7 @@ -- exits successfully, that brancher is considered usable. findUsableBranchers :: IO (Data.Map.Map PD.RepoType Brancher) findUsableBranchers = do-    let usable (_, brancher) = do+    let usable (_, brancher) = flip catchIO (const (return False)) $ do          let cmd = brancherBinary brancher          (exitCode, _, _) <- readProcessWithExitCode cmd ["--help"] ""          return (exitCode == ExitSuccess)
Distribution/Client/Install.hs view
@@ -187,7 +187,7 @@                                    then installFailedInSandbox else [])     -- TODO: use a better error message, remove duplication.     installFailedInSandbox =-      "Note: when using a sandbox, all packages are required to have \+      "\nNote: when using a sandbox, all packages are required to have \       \consistent dependencies. \       \Try reinstalling/unregistering the offending packages or \       \recreating the sandbox."
Distribution/Client/JobControl.hs view
@@ -28,8 +28,7 @@  import Control.Monad import Control.Concurrent hiding (QSem, newQSem, waitQSem, signalQSem)-import Control.Exception (SomeException, bracket_, throw, try)-import Distribution.Client.Compat.Exception (mask)+import Control.Exception (SomeException, bracket_, mask, throw, try) import Distribution.Client.Compat.Semaphore  data JobControl m a = JobControl {
Distribution/Client/Run.hs view
@@ -7,21 +7,16 @@ -- Implementation of the 'run' command. ----------------------------------------------------------------------------- -module Distribution.Client.Run ( run )+module Distribution.Client.Run ( run, splitRunArgs )        where -import Distribution.Client.Setup             (BuildFlags (..))-import Distribution.Client.SetupWrapper      (SetupScriptOptions (..),-                                              defaultSetupScriptOptions) import Distribution.Client.Utils             (tryCanonicalizePath)  import Distribution.PackageDescription       (Executable (..),                                               PackageDescription (..)) import Distribution.Simple.Build.PathsModule (pkgPathEnvVar) import Distribution.Simple.BuildPaths        (exeExtension)-import Distribution.Simple.Configure         (getPersistBuildConfig) import Distribution.Simple.LocalBuildInfo    (LocalBuildInfo (..))-import Distribution.Simple.Setup             (fromFlagOrDefault) import Distribution.Simple.Utils             (die, rawSystemExitWithEnv) import Distribution.Verbosity                (Verbosity) @@ -32,39 +27,38 @@ import System.FilePath                       ((<.>), (</>))  -run :: Verbosity -> BuildFlags -> [String] -> IO ()-run verbosity buildFlags args = do-  let distPref = fromFlagOrDefault (useDistPref defaultSetupScriptOptions)-                 (buildDistPref buildFlags)-  -- The package must have been configured by now.-  lbi <- getPersistBuildConfig distPref--  curDir <- getCurrentDirectory-  let buildPref     = buildDir lbi-      pkg_descr     = localPkgDescr lbi-      exes          = executables pkg_descr-      dataDirEnvVar = (pkgPathEnvVar pkg_descr "datadir",-                       curDir </> dataDir pkg_descr)--      exePath :: Executable -> FilePath-      exePath exe = buildPref </> exeName exe </> (exeName exe <.> exeExtension)--      doRun :: Executable -> [String] -> IO ()-      doRun exe exeArgs = do-        path <- tryCanonicalizePath $ exePath exe-        env <- (dataDirEnvVar:) <$> getEnvironment-        rawSystemExitWithEnv verbosity path exeArgs env-+-- | Return the executable to run and any extra arguments that should be+-- forwarded to it.+splitRunArgs :: LocalBuildInfo -> [String] -> IO (Executable, [String])+splitRunArgs lbi args =   case exes of     []    -> die "Couldn't find any executables."     [exe] -> case args of-      []                        -> doRun exe []-      (x:xs) | x == exeName exe -> doRun exe xs-             | otherwise        -> doRun exe args+      []                        -> return (exe, [])+      (x:xs) | x == exeName exe -> return (exe, xs)+             | otherwise        -> return (exe, args)     _     -> case args of       []     -> die $ "This package contains multiple executables. "                 ++ "You must pass the executable name as the first argument "-                ++ "to run."+                ++ "to 'cabal run'."       (x:xs) -> case find (\exe -> exeName exe == x) exes of         Nothing  -> die $ "No executable named '" ++ x ++ "'."-        Just exe -> doRun exe xs+        Just exe -> return (exe, xs)+  where+    pkg_descr = localPkgDescr lbi+    exes      = executables pkg_descr+++-- | Run a given executable.+run :: Verbosity -> LocalBuildInfo -> Executable -> [String] -> IO ()+run verbosity lbi exe exeArgs = do+  curDir <- getCurrentDirectory+  let buildPref     = buildDir lbi+      pkg_descr     = localPkgDescr lbi+      dataDirEnvVar = (pkgPathEnvVar pkg_descr "datadir",+                       curDir </> dataDir pkg_descr)++  path <- tryCanonicalizePath $+          buildPref </> exeName exe </> (exeName exe <.> exeExtension)+  env  <- (dataDirEnvVar:) <$> getEnvironment+  rawSystemExitWithEnv verbosity path exeArgs env
Main.hs view
@@ -64,7 +64,7 @@ import Distribution.Client.Check as Check     (check) --import Distribution.Client.Clean            (clean) import Distribution.Client.Upload as Upload   (upload, check, report)-import Distribution.Client.Run                (run)+import Distribution.Client.Run                (run, splitRunArgs) import Distribution.Client.SrcDist            (sdist) import Distribution.Client.Get                (get) import Distribution.Client.Sandbox            (sandboxInit@@ -95,6 +95,8 @@ import Distribution.Client.Init               (initCabal) import qualified Distribution.Client.Win32SelfUpgrade as Win32SelfUpgrade +import Distribution.PackageDescription+         ( Executable(..) ) import Distribution.Simple.Command          ( CommandParse(..), CommandUI(..), Command          , commandsRun, commandAddAction, hiddenCommand )@@ -103,7 +105,7 @@ import Distribution.Simple.Configure          ( checkPersistBuildConfigOutdated, configCompilerAuxEx          , ConfigStateFileErrorType(..), localBuildInfoFile-         , tryGetPersistBuildConfig )+         , getPersistBuildConfig, tryGetPersistBuildConfig ) import qualified Distribution.Simple.LocalBuildInfo as LBI import Distribution.Simple.Program (defaultProgramConfiguration) import qualified Distribution.Simple.Setup as Cabal@@ -813,11 +815,14 @@                 globalFlags noAddSource (buildNumJobs buildExFlags)                 (const Nothing) +  lbi <- getPersistBuildConfig distPref+  (exe, exeArgs) <- splitRunArgs lbi extraArgs+   maybeWithSandboxDirOnSearchPath useSandbox $-    build verbosity distPref mempty []+    build verbosity distPref mempty ["exe:" ++ exeName exe]    maybeWithSandboxDirOnSearchPath useSandbox $-    run verbosity buildFlags extraArgs+    run verbosity lbi exe exeArgs  getAction :: GetFlags -> [String] -> GlobalFlags -> IO () getAction getFlags extraArgs globalFlags = do
bootstrap.sh view
@@ -53,7 +53,7 @@ DEEPSEQ_VER="1.3.0.1"; DEEPSEQ_VER_REGEXP="1\.[1-9]\."         # >= 1.1 && < 2 TEXT_VER="0.11.3.1";   TEXT_VER_REGEXP="0\.([2-9]|(1[0-1]))\." # >= 0.2 && < 0.12 NETWORK_VER="2.4.1.2"; NETWORK_VER_REGEXP="2\."                # == 2.*-CABAL_VER="1.18.0";    CABAL_VER_REGEXP="1\.1[89]\."           # >= 1.18 && < 1.20+CABAL_VER="1.18.1";    CABAL_VER_REGEXP="1\.1[89]\."           # >= 1.18 && < 1.20 TRANS_VER="0.3.0.0";   TRANS_VER_REGEXP="0\.[23]\."            # >= 0.2.* && < 0.4.* MTL_VER="2.1.2";       MTL_VER_REGEXP="[2]\."                  #  == 2.* HTTP_VER="4000.2.8";   HTTP_VER_REGEXP="4000\.[012]\."         # == 4000.0.* || 4000.1.* || 4000.2.*@@ -122,7 +122,7 @@   URL=${HACKAGE_URL}/${PKG}/${VER}/${PKG}-${VER}.tar.gz   if which ${CURL} > /dev/null   then-    ${CURL} --fail -C - -O ${URL} || die "Failed to download ${PKG}."+    ${CURL} -L --fail -C - -O ${URL} || die "Failed to download ${PKG}."   elif which ${WGET} > /dev/null   then     ${WGET} -c ${URL} || die "Failed to download ${PKG}."
cabal-install.cabal view
@@ -1,5 +1,5 @@ Name:               cabal-install-Version:            1.18.0.1+Version:            1.18.0.2 Synopsis:           The command-line interface for Cabal and Hackage. Description:     The \'cabal\' command-line program simplifies the process of managing@@ -106,12 +106,13 @@         Distribution.Client.World         Distribution.Client.Win32SelfUpgrade         Distribution.Client.Compat.Environment-        Distribution.Client.Compat.Exception         Distribution.Client.Compat.FilePerms         Distribution.Client.Compat.Semaphore         Distribution.Client.Compat.Time         Paths_cabal_install +    -- NOTE: when updating build-depends, don't forget to update version regexps+    -- in bootstrap.sh.     build-depends:         array      >= 0.1      && < 0.5,         base       >= 4        && < 5,@@ -123,16 +124,17 @@         mtl        >= 2.0      && < 3,         network    >= 1        && < 3,         pretty     >= 1        && < 1.2,-        process    >= 1.0.1.1  && < 1.3,         random     >= 1        && < 1.1,         stm        >= 2.0      && < 3,         time       >= 1.1      && < 1.5,         zlib       >= 0.5.3    && < 0.6      if flag(old-directory)-      build-depends: directory >= 1 && < 1.2, old-time >= 1 && < 1.2+      build-depends: directory >= 1 && < 1.2, old-time >= 1 && < 1.2,+                     process   >= 1.0.1.1  && < 1.1.0.2     else-      build-depends: directory >= 1.2 && < 1.3+      build-depends: directory >= 1.2 && < 1.3,+                     process   >= 1.1.0.2  && < 1.3      if os(windows)       build-depends: Win32 >= 2 && < 3@@ -140,7 +142,8 @@     else       build-depends: unix >= 2.0 && < 2.8 -    if arch(arm)+    if arch(arm) && impl(ghc < 7.6)+       -- older ghc on arm does not supprt -threaded        cc-options:  -DCABAL_NO_THREADED     else        ghc-options: -threaded