Skip to content

Commit

Permalink
Update messages for old-install
Browse files Browse the repository at this point in the history
  • Loading branch information
ChShersh authored and hvr committed Jul 29, 2018
1 parent ebff125 commit c293add
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions cabal-install/Distribution/Client/Install.hs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ import Distribution.Simple.Utils as Utils
, withTempDirectory )
import Distribution.Client.Utils
( determineNumJobs, logDirChange, mergeBy, MergeResult(..)
, tryCanonicalizePath )
, tryCanonicalizePath, ProgressPhase(..), progressMessage )
import Distribution.System
( Platform, OS(Windows), buildOS, buildPlatform )
import Distribution.Text
Expand Down Expand Up @@ -1197,7 +1197,7 @@ executeInstallPlan verbosity jobCtl keepGoing useLogFile plan0 installPkg =
-- otherwise.
printBuildResult :: PackageId -> UnitId -> BuildOutcome -> IO ()
printBuildResult pkgid uid buildOutcome = case buildOutcome of
(Right _) -> notice verbosity $ "Installed " ++ display pkgid
(Right _) -> progressMessage verbosity ProgressCompleted (display pkgid)
(Left _) -> do
notice verbosity $ "Failed to install " ++ display pkgid
when (verbosity >= normal) $
Expand Down Expand Up @@ -1398,14 +1398,12 @@ installUnpackedPackage verbosity installLock numJobs
logDirChange (maybe (const (return ())) appendFile mLogPath) workingDir $ do
-- Configure phase
onFailure ConfigureFailed $ do
when (numJobs > 1) $ notice verbosity $
"Configuring " ++ display pkgid ++ "..."
noticeProgress ProgressStarting
setup configureCommand configureFlags mLogPath

-- Build phase
onFailure BuildFailed $ do
when (numJobs > 1) $ notice verbosity $
"Building " ++ display pkgid ++ "..."
noticeProgress ProgressBuilding
setup buildCommand' buildFlags mLogPath

-- Doc generation phase
Expand Down Expand Up @@ -1452,6 +1450,12 @@ installUnpackedPackage verbosity installLock numJobs
uid = installedUnitId rpkg
cinfo = compilerInfo comp
buildCommand' = buildCommand progdb
dispname = display pkgid
isParallelBuild = numJobs >= 2

noticeProgress phase = when isParallelBuild $
progressMessage verbosity phase dispname

buildFlags _ = emptyBuildFlags {
buildDistPref = configDistPref configFlags,
buildVerbosity = toFlag verbosity'
Expand Down

0 comments on commit c293add

Please sign in to comment.