Commit 8d8af5ee authored by ian@well-typed.com's avatar ian@well-typed.com

Revert "Always use --force when registering packages"

This reverts commit c67b4313.

We no longer need to always force, as ghc-pkg is cleverer.
parent c03a899a
......@@ -182,7 +182,7 @@ doRegister :: FilePath -> FilePath -> FilePath -> FilePath
-> String -> [String]
-> IO ()
doRegister ghc ghcpkg topdir directory distDir
_ myPrefix myLibdir myDocdir
myDestDir myPrefix myLibdir myDocdir
relocatableBuildStr args
= withCurrentDirectory directory $ do
relocatableBuild <- case relocatableBuildStr of
......@@ -210,7 +210,7 @@ doRegister ghc ghcpkg topdir directory distDir
programFindLocation = \_ -> return (Just ghc) }
ghcPkgProgram' = ghcPkgProgram {
programPostConf = \_ _ -> return $ ["--global-package-db", ghcpkgconf]
++ ["--force"],
++ ["--force" | not (null myDestDir) ],
programFindLocation = \_ -> return (Just ghcpkg) }
configurePrograms ps conf = foldM (flip (configureProgram verbosity)) conf ps
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment