[commit: ghc] master: Sync Cabal to upstream version 1.18 pre-release (795fe08)

git at git.haskell.org git at git.haskell.org
Mon Aug 26 23:44:31 CEST 2013


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/795fe083e59fa22055cca53fadc36ebd26b0d2a5/ghc

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

commit 795fe083e59fa22055cca53fadc36ebd26b0d2a5
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Mon Aug 26 22:03:25 2013 +0200

    Sync Cabal to upstream version 1.18 pre-release
    
    Apart from bumping build-dep version bounds, `ghc-cabal` is adapted to
    some minor Cabal API changes, and `bin-package-db` is made aware of
    Cabal's recently added AGPL licence support.


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

795fe083e59fa22055cca53fadc36ebd26b0d2a5
 libraries/Cabal                                           |    2 +-
 .../Distribution/InstalledPackageInfo/Binary.hs           |    4 +++-
 libraries/bin-package-db/bin-package-db.cabal             |    2 +-
 utils/ghc-cabal/Main.hs                                   |   13 +++++++------
 utils/ghc-cabal/ghc-cabal.cabal                           |    2 +-
 5 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/libraries/Cabal b/libraries/Cabal
index 5fa5c41..85cb83d 160000
--- a/libraries/Cabal
+++ b/libraries/Cabal
@@ -1 +1 @@
-Subproject commit 5fa5c41cd9d2c9b4b543312af6919fe3d8588654
+Subproject commit 85cb83d7d8dbc8e59e20d31323e660608eb52557
diff --git a/libraries/bin-package-db/Distribution/InstalledPackageInfo/Binary.hs b/libraries/bin-package-db/Distribution/InstalledPackageInfo/Binary.hs
index 123f91a..27e23d8 100644
--- a/libraries/bin-package-db/Distribution/InstalledPackageInfo/Binary.hs
+++ b/libraries/bin-package-db/Distribution/InstalledPackageInfo/Binary.hs
@@ -131,7 +131,8 @@ instance Binary License where
   put AllRightsReserved    = do putWord8 6
   put OtherLicense         = do putWord8 7
   put (Apache v)           = do putWord8 8; put v
-  put (UnknownLicense str) = do putWord8 9; put str
+  put (AGPL v)             = do putWord8 9; put v
+  put (UnknownLicense str) = do putWord8 10; put str
 
   get = do
     n <- getWord8
@@ -145,6 +146,7 @@ instance Binary License where
       6 -> return AllRightsReserved
       7 -> return OtherLicense
       8 -> do v <- get; return (Apache v)
+      9 -> do v <- get; return (AGPL v)
       _ -> do str <- get; return (UnknownLicense str)
 
 instance Binary Version where
diff --git a/libraries/bin-package-db/bin-package-db.cabal b/libraries/bin-package-db/bin-package-db.cabal
index c03399c..c308b60 100644
--- a/libraries/bin-package-db/bin-package-db.cabal
+++ b/libraries/bin-package-db/bin-package-db.cabal
@@ -18,7 +18,7 @@ Library {
     build-depends: base >= 4 && < 5
 
     build-depends: binary >= 0.5 && < 0.8,
-                   Cabal >= 1.8 && < 1.18
+                   Cabal >= 1.18 && < 1.19
 
     extensions: CPP
 }
diff --git a/utils/ghc-cabal/Main.hs b/utils/ghc-cabal/Main.hs
index 9a76d6b..7d1d9bc 100644
--- a/utils/ghc-cabal/Main.hs
+++ b/utils/ghc-cabal/Main.hs
@@ -167,7 +167,7 @@ doCopy directory distDir
                                                  (installDirTemplates lbi)
                 progs = withPrograms lbi
                 stripProgram' = stripProgram {
-                    programFindLocation = \_ -> return (Just strip) }
+                    programFindLocation = \_ _ -> return (Just strip) }
 
             progs' <- configureProgram verbosity stripProgram' progs
             let lbi' = lbi {
@@ -205,12 +205,13 @@ doRegister directory distDir ghc ghcpkg topdir
                 progs = withPrograms lbi
                 ghcpkgconf = topdir </> "package.conf.d"
                 ghcProgram' = ghcProgram {
-                    programPostConf = \_ _ -> return ["-B" ++ topdir],
-                    programFindLocation = \_ -> return (Just ghc) }
+                    programPostConf = \_ cp -> return cp { programDefaultArgs = ["-B" ++ topdir] },
+                    programFindLocation = \_ _ -> return (Just ghc) }
                 ghcPkgProgram' = ghcPkgProgram {
-                    programPostConf = \_ _ -> return $ ["--global-package-db", ghcpkgconf]
-                                                    ++ ["--force" | not (null myDestDir) ],
-                    programFindLocation = \_ -> return (Just ghcpkg) }
+                    programPostConf = \_ cp -> return cp { programDefaultArgs =
+                                                                ["--global-package-db", ghcpkgconf]
+                                                                ++ ["--force" | not (null myDestDir) ] },
+                    programFindLocation = \_ _ -> return (Just ghcpkg) }
                 configurePrograms ps conf = foldM (flip (configureProgram verbosity)) conf ps
 
             progs' <- configurePrograms [ghcProgram', ghcPkgProgram'] progs
diff --git a/utils/ghc-cabal/ghc-cabal.cabal b/utils/ghc-cabal/ghc-cabal.cabal
index 8646204..10d6e0a 100644
--- a/utils/ghc-cabal/ghc-cabal.cabal
+++ b/utils/ghc-cabal/ghc-cabal.cabal
@@ -17,7 +17,7 @@ Executable ghc-cabal
 
     Build-Depends: base       >= 3   && < 5,
                    bytestring >= 0.10 && < 0.11,
-                   Cabal      >= 1.10 && < 1.18,
+                   Cabal      >= 1.18 && < 1.19,
                    directory  >= 1.1 && < 1.3,
                    filepath   >= 1.2 && < 1.4
 





More information about the ghc-commits mailing list