Skip to content

Commit

Permalink
Recompute package registration AFTER we install (haskell#3257).
Browse files Browse the repository at this point in the history
It needs to be done afterwards, because we need to compute
the ABI hash as part of registration, which can't be done
unless all dependencies are registered, which could include
internal libraries.

This whole affair is very dodgy.

Signed-off-by: Edward Z. Yang <[email protected]>
  • Loading branch information
ezyang committed Apr 1, 2016
1 parent 38b2b4a commit 2bd9e11
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cabal-install/Distribution/Client/Install.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1462,9 +1462,6 @@ installUnpackedPackage verbosity buildLimit installLock numJobs

-- Install phase
onFailure InstallFailed $ criticalSection installLock $ do
-- Capture installed package configuration file
maybePkgConf <- maybeGenPkgConf mLogPath

-- Actual installation
withWin32SelfUpgrade verbosity ipid configFlags
cinfo platform pkg $ do
Expand All @@ -1474,6 +1471,11 @@ installUnpackedPackage verbosity buildLimit installLock numJobs
setup Cabal.copyCommand copyFlags mLogPath
when shouldRegister $ do
setup Cabal.registerCommand registerFlags mLogPath

-- Capture installed package configuration file
-- TODO: Why do we need this?
maybePkgConf <- maybeGenPkgConf mLogPath

return (Right (BuildOk docsResult testsResult maybePkgConf))

where
Expand Down

0 comments on commit 2bd9e11

Please sign in to comment.