From 3ad22e55120644915d2ccd3c01a23fe2c437e42b Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Thu, 31 Mar 2016 21:12:46 -0700 Subject: [PATCH] Recompute package registration AFTER we install (#3257). 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 --- cabal-install/Distribution/Client/Install.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cabal-install/Distribution/Client/Install.hs b/cabal-install/Distribution/Client/Install.hs index 3e3279be45b..6bd06b923f6 100644 --- a/cabal-install/Distribution/Client/Install.hs +++ b/cabal-install/Distribution/Client/Install.hs @@ -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 @@ -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