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

Always use --force when registering packages

When dynamic-by-default, we may only have .dyn_hi files, and ghc-pkg
complains if there are no .hi files.
parent 68ae1132
......@@ -182,7 +182,7 @@ doRegister :: FilePath -> FilePath -> FilePath -> FilePath
-> String -> [String]
-> IO ()
doRegister ghc ghcpkg topdir directory distDir
myDestDir myPrefix myLibdir myDocdir
_ 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" | not (null myDestDir) ],
++ ["--force"],
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