diff options
author | Ian Lynagh <ian@well-typed.com> | 2012-10-25 16:37:46 +0100 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2012-10-25 16:37:46 +0100 |
commit | 8d8af5eefc018506be8916e11946cd88cb970b81 (patch) | |
tree | b1e4ceb6fe0ec9ee13a2ca94227af1f5d08e2525 | |
parent | c03a899a593f32e6bf0a79a9f313aeecf746d9de (diff) | |
download | haskell-8d8af5eefc018506be8916e11946cd88cb970b81.tar.gz |
Revert "Always use --force when registering packages"
This reverts commit c67b43133ee9f71b280577b274cb3753a396a83a.
We no longer need to always force, as ghc-pkg is cleverer.
-rw-r--r-- | utils/ghc-cabal/Main.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/ghc-cabal/Main.hs b/utils/ghc-cabal/Main.hs index 5c68c6ec1e..6878afe3bb 100644 --- a/utils/ghc-cabal/Main.hs +++ b/utils/ghc-cabal/Main.hs @@ -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 |