[commit: ghc] master: Always use --force when registering packages (c67b431)

Ian Lynagh <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/c67b43133ee9f71b280577b274cb3753a396a83a

>---------------------------------------------------------------

commit c67b43133ee9f71b280577b274cb3753a396a83a
Author: Ian Lynagh <[email protected]>
Date:   Thu Oct 25 02:16:58 2012 +0100

    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.

>---------------------------------------------------------------

 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 6878afe..5c68c6e 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
-           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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.