Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: haskell/cabal
...
head fork: haskell/cabal
Checking mergeability… Don't worry, you can still create the pull request.
  • 16 commits
  • 17 files changed
  • 2 commit comments
  • 4 contributors
Commits on Sep 29, 2012
@dcoutts dcoutts On install, update the .cabal file with the one from the index
(patch manually merged into the cabal-1.16 branch)

This allows us to make minor changes to packages after they have been
released, without changing the package .tar.gz file. We already keep
the .cabal file outsite the package in the index and use it for
dependency planning. This already lets us do fixes such as making
dependency constraints tighter. Currently we cannot make dep
constraints more relaxed however, since the original .cabal file is
the one used when we get to the actual configure step.

So with this change, we now use the updated .cabal file for the
configure and build too. So there's more fixes we can do post-release.
In particlar, in combination with easier editing on hackage, this
should help us address the problems around the PVP and open or closed
version constraints. It should allow a system of conservative upper
bounds, but allow editing them when new versions of deps are released
and we find that they happen to work fine.
22d3772
@dcoutts dcoutts Extend the unpack command for the .cabal file updating
By default, "cabal unpack blah" will also update the .cabal file with
the one from the index, so it's consistent with what you get via
cabal install. Also added a --pristine flag so you can get the original
tarball without the updated .cabal file.
68d7243
Commits on Oct 02, 2012
@tibbe tibbe Bump Cabal version number to 1.16.0.1 ebc9124
@tibbe tibbe Bump cabal-install version number to 1.16.0 5ea2203
Commits on Oct 03, 2012
@tibbe tibbe Update bug tracker location 7d6b527
@dcoutts dcoutts Fix building cabal-install with ghc-6.12 and older
Fall back to using serial rather job control for base < 4.3.
So this means if you build caba-install with ghc-6.12 or older
then the -j flag will do nothing, it'll still run serially.

BTW, if anyone wants to build cabal-install using a Haskell impl
with no support for concurrency then they can use the same trick.
(The serial and parallel job control impls deliberately share the
same interface.)
ce2fc30
Commits on Oct 05, 2012
@dcoutts dcoutts Disable setting the jobs: $nprocs line in default ~/.cabal config
It breaks for fresh installs with users who have Cabal-1.6.0
rather than Cabal-1.6.0.1, ie users of ghc-7.6.1.
aa7d98f
@asr asr Fixed warnings on the generated Paths module.
The warnings are generated by the flag '-fwarn-missing-import-lists'.
df6fe40
Commits on Oct 07, 2012
@tibbe tibbe Fix compilation error 41e9d1e
Commits on Oct 11, 2012
@tibbe tibbe Bump network dependency in bootstrap.sh to 2.3.1.1
network-2.3.1.0 does not build on Windows with GHC 7.6.1.
5485579
@tibbe tibbe Merge branch 'cabal-1.16' of https://github.com/asr/cabal into cabal-…
…1.16
dcf5e03
@tibbe tibbe Bump Cabal version number to 1.16.0.2 2afcbb5
@tibbe tibbe Bump cabal-install version number to 1.16.0.1 e99e308
@tibbe tibbe Change bootstrap.sh to require Cabal >= 1.16 && < 1.18 6c5d844
Commits on Oct 13, 2012
@snoyberg snoyberg Fix installing from custom folder on Linux (#1058) 48082b9
Commits on Oct 24, 2012
@tibbe tibbe Have bootstrap.sh use Cabal-1.16.0.2 e1912a3
View
4 Cabal/Cabal.cabal
@@ -1,5 +1,5 @@
Name: Cabal
-Version: 1.16.0
+Version: 1.16.0.2
Copyright: 2003-2006, Isaac Jones
2005-2011, Duncan Coutts
License: BSD3
@@ -8,7 +8,7 @@ Author: Isaac Jones <ijones@syntaxpolice.org>
Duncan Coutts <duncan@community.haskell.org>
Maintainer: cabal-devel@haskell.org
Homepage: http://www.haskell.org/cabal/
-bug-reports: http://hackage.haskell.org/trac/hackage/
+bug-reports: https://github.com/haskell/cabal/issues
Synopsis: A framework for packaging Haskell software
Description:
The Haskell Common Architecture for Building Applications and
View
4 Cabal/Distribution/Simple/Build/PathsModule.hs
@@ -73,9 +73,9 @@ generate pkg_descr lbi =
"\n"++
foreign_imports++
"import qualified Control.Exception as Exception\n"++
- "import Data.Version (Version(..))\n"++
+ "import Data.Version (Version(Version, versionBranch, versionTags))\n"++
"import System.Environment (getEnv)\n"++
- "import Prelude\n"++
+ "import Prelude ((++), FilePath, IO, return)\n"++
"\n"++
"catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a\n"++
"catchIO = Exception.catch\n" ++
View
6 cabal-install/Distribution/Client/Config.hs
@@ -36,8 +36,6 @@ import Distribution.Client.Setup
, UploadFlags(..), uploadCommand
, ReportFlags(..), reportCommand
, showRepo, parseRepo )
-import Distribution.Client.Utils
- ( numberOfProcessors )
import Distribution.Simple.Compiler
( OptimisationLevel(..) )
@@ -202,8 +200,8 @@ initialSavedConfig = do
},
savedInstallFlags = mempty {
installSummaryFile = [toPathTemplate (logsDir </> "build.log")],
- installBuildReports= toFlag AnonymousReports,
- installNumJobs = toFlag (Just numberOfProcessors)
+ installBuildReports= toFlag AnonymousReports
+ --installNumJobs = toFlag (Just numberOfProcessors)
}
}
View
7 cabal-install/Distribution/Client/Configure.hs
@@ -82,7 +82,7 @@ configure verbosity packageDBs repos comp conf
configureCommand (const configFlags) extraArgs
Right installPlan -> case InstallPlan.ready installPlan of
- [pkg@(ConfiguredPackage (SourcePackage _ _ (LocalUnpackedPackage _)) _ _ _)] ->
+ [pkg@(ConfiguredPackage (SourcePackage _ _ (LocalUnpackedPackage _) _) _ _ _)] ->
configurePackage verbosity
(InstallPlan.planPlatform installPlan)
(InstallPlan.planCompiler installPlan)
@@ -138,7 +138,8 @@ planLocalPackage verbosity comp configFlags configExFlags installedPkgIndex
localPkg = SourcePackage {
packageInfoId = packageId pkg,
Source.packageDescription = pkg,
- packageSource = LocalUnpackedPackage "."
+ packageSource = LocalUnpackedPackage ".",
+ packageDescrOverride = Nothing
}
testsEnabled = fromFlagOrDefault False $ configTests configFlags
@@ -194,7 +195,7 @@ configurePackage :: Verbosity
-> [String]
-> IO ()
configurePackage verbosity platform comp scriptOptions configFlags
- (ConfiguredPackage (SourcePackage _ gpkg _) flags stanzas deps) extraArgs =
+ (ConfiguredPackage (SourcePackage _ gpkg _ _) flags stanzas deps) extraArgs =
setupWrapper verbosity
scriptOptions (Just pkg) configureCommand configureFlags extraArgs
View
2  cabal-install/Distribution/Client/Dependency/Modular/IndexConversion.hs
@@ -92,7 +92,7 @@ convSPI os arch cid = mkIndex . convSPI' os arch cid
-- | Convert a single source package into the solver-specific format.
convSP :: OS -> Arch -> CompilerId -> SourcePackage -> (PN, I, PInfo)
-convSP os arch cid (SourcePackage (PackageIdentifier pn pv) gpd _pl) =
+convSP os arch cid (SourcePackage (PackageIdentifier pn pv) gpd _ _pl) =
let i = I pv InRepo
in (pn, i, convGPD os arch cid (PI pn i) gpd)
View
8 cabal-install/Distribution/Client/Dependency/TopDown.hs
@@ -368,7 +368,7 @@ pruneBottomUp platform comp constraints =
[ (dep, Constraints.conflicting cs dep)
| dep <- missing ]
- configure cs (UnconfiguredPackage (SourcePackage _ pkg _) _ flags stanzas) =
+ configure cs (UnconfiguredPackage (SourcePackage _ pkg _ _) _ flags stanzas) =
finalizePackageDescription flags (dependencySatisfiable cs)
platform comp [] (enableStanzas stanzas pkg)
dependencySatisfiable cs =
@@ -397,7 +397,7 @@ configurePackage platform comp available spkg = case spkg of
InstalledAndSource ipkg apkg -> fmap (InstalledAndSource ipkg)
(configure apkg)
where
- configure (UnconfiguredPackage apkg@(SourcePackage _ p _) _ flags stanzas) =
+ configure (UnconfiguredPackage apkg@(SourcePackage _ p _ _) _ flags stanzas) =
case finalizePackageDescription flags dependencySatisfiable
platform comp [] (enableStanzas stanzas p) of
Left missing -> Left missing
@@ -481,7 +481,7 @@ topologicalSortNumbering installedPkgIndex sourcePkgIndex =
++ [ ((), packageName pkg, nub deps)
| pkgs@(pkg:_) <- PackageIndex.allPackagesByName sourcePkgIndex
, let deps = [ depName
- | SourcePackage _ pkg' _ <- pkgs
+ | SourcePackage _ pkg' _ _ <- pkgs
, Dependency depName _ <-
buildDepends (flattenPackageDescription pkg') ] ]
@@ -517,7 +517,7 @@ selectNeededSubset installedPkgIndex sourcePkgIndex = select mempty mempty
| pkg <- moreInstalled
, dep <- depends pkg ]
++ [ name
- | SourcePackage _ pkg _ <- moreSource
+ | SourcePackage _ pkg _ _ <- moreSource
, Dependency name _ <-
buildDepends (flattenPackageDescription pkg) ]
installedPkgIndex'' = foldl' (flip PackageIndex.insert)
View
25 cabal-install/Distribution/Client/IndexUtils.hs
@@ -169,11 +169,12 @@ readRepoIndex verbosity repo =
readPackageIndexCacheFile mkAvailablePackage indexFile cacheFile
where
- mkAvailablePackage pkgid pkg =
+ mkAvailablePackage pkgid pkgtxt pkg =
SourcePackage {
packageInfoId = pkgid,
packageDescription = pkg,
- packageSource = RepoTarballPackage repo pkgid Nothing
+ packageSource = RepoTarballPackage repo pkgid Nothing,
+ packageDescrOverride = Just pkgtxt
}
handleNotFound action = catchIO action $ \e -> if isDoesNotExistError e
@@ -339,7 +340,8 @@ updatePackageIndexCacheFile indexFile cacheFile = do
++ [ CachePackageId pkgid blockNo | (pkgid, _, blockNo) <- pkgs ]
readPackageIndexCacheFile :: Package pkg
- => (PackageId -> GenericPackageDescription -> pkg)
+ => (PackageId -> ByteString
+ -> GenericPackageDescription -> pkg)
-> FilePath
-> FilePath
-> IO (PackageIndex pkg, [Dependency])
@@ -350,7 +352,8 @@ readPackageIndexCacheFile mkPkg indexFile cacheFile = do
packageIndexFromCache :: Package pkg
- => (PackageId -> GenericPackageDescription -> pkg)
+ => (PackageId -> ByteString
+ -> GenericPackageDescription -> pkg)
-> Handle
-> [IndexCacheEntry]
-> IO (PackageIndex pkg, [Dependency])
@@ -368,20 +371,22 @@ packageIndexFromCache mkPkg hnd = accum mempty []
-- The magic here is that we use lazy IO to read the .cabal file
-- from the index tarball if it turns out that we need it.
-- Most of the time we only need the package id.
- pkg <- unsafeInterleaveIO $ do
- getPackageDescription blockno
- let srcpkg = mkPkg pkgid pkg
+ ~(pkg, pkgtxt) <- unsafeInterleaveIO $ do
+ pkgtxt <- getEntryContent blockno
+ pkg <- readPackageDescription pkgtxt
+ return (pkg, pkgtxt)
+
+ let srcpkg = mkPkg pkgid pkgtxt pkg
accum (srcpkg:srcpkgs) prefs entries
accum srcpkgs prefs (CachePreference pref : entries) =
accum srcpkgs (pref:prefs) entries
- getPackageDescription blockno = do
+ getEntryContent blockno = do
hSeek hnd AbsoluteSeek (fromIntegral (blockno * 512))
header <- BS.hGet hnd 512
size <- getEntrySize header
- content <- BS.hGet hnd (fromIntegral size)
- readPackageDescription content
+ BS.hGet hnd (fromIntegral size)
getEntrySize header =
case Tar.read header of
View
29 cabal-install/Distribution/Client/Install.hs
@@ -22,6 +22,8 @@ import Data.List
( unfoldr, nub, sort, (\\) )
import Data.Maybe
( isJust, fromMaybe, maybeToList )
+import qualified Data.ByteString.Lazy.Char8 as BS
+ ( unpack )
import Control.Exception as Exception
( bracket, handleJust )
#if MIN_VERSION_base(4,0,0)
@@ -95,7 +97,7 @@ import qualified Distribution.Simple.Setup as Cabal
( installCommand, InstallFlags(..), emptyInstallFlags
, emptyTestFlags, testCommand, Flag(..) )
import Distribution.Simple.Utils
- ( rawSystemExit, comparing )
+ ( rawSystemExit, comparing, writeFileAtomic )
import Distribution.Simple.InstallDirs as InstallDirs
( PathTemplate, fromPathTemplate, toPathTemplate, substPathTemplate
, initialPathTemplateEnv, installDirsTemplateEnv )
@@ -755,13 +757,13 @@ performInstallations verbosity
executeInstallPlan verbosity jobControl useLogFile installPlan $ \cpkg ->
installConfiguredPackage platform compid configFlags
- cpkg $ \configFlags' src pkg ->
+ cpkg $ \configFlags' src pkg pkgoverride ->
fetchSourcePackage verbosity fetchLimit src $ \src' ->
installLocalPackage verbosity buildLimit (packageId pkg) src' $ \mpath ->
installUnpackedPackage verbosity buildLimit installLock numJobs
(setupScriptOptions installedPkgIndex cacheLock)
miscOptions configFlags' installFlags haddockFlags
- compid pkg mpath useLogFile
+ compid pkg pkgoverride mpath useLogFile
where
platform = InstallPlan.planPlatform installPlan
@@ -930,16 +932,17 @@ executeInstallPlan verbosity jobCtl useLogFile plan0 installPkg =
installConfiguredPackage :: Platform -> CompilerId
-> ConfigFlags -> ConfiguredPackage
-> (ConfigFlags -> PackageLocation (Maybe FilePath)
- -> PackageDescription -> a)
+ -> PackageDescription
+ -> PackageDescriptionOverride -> a)
-> a
installConfiguredPackage platform comp configFlags
- (ConfiguredPackage (SourcePackage _ gpkg source) flags stanzas deps)
+ (ConfiguredPackage (SourcePackage _ gpkg source pkgoverride) flags stanzas deps)
installPkg = installPkg configFlags {
configConfigurationsFlags = flags,
configConstraints = map thisPackageVersion deps,
configBenchmarks = toFlag False,
configTests = toFlag (TestStanzas `elem` stanzas)
- } source pkg
+ } source pkg pkgoverride
where
pkg = case finalizePackageDescription flags
(const True)
@@ -1025,13 +1028,25 @@ installUnpackedPackage
-> HaddockFlags
-> CompilerId
-> PackageDescription
+ -> PackageDescriptionOverride
-> Maybe FilePath -- ^ Directory to change to before starting the installation.
-> UseLogFile -- ^ File to log output to (if any)
-> IO BuildResult
installUnpackedPackage verbosity buildLimit installLock numJobs
scriptOptions miscOptions
configFlags installConfigFlags haddockFlags
- compid pkg workingDir useLogFile =
+ compid pkg pkgoverride workingDir useLogFile = do
+
+ -- Override the .cabal file if necessary
+ case pkgoverride of
+ Nothing -> return ()
+ Just pkgtxt -> do
+ let descFilePath = fromMaybe "." workingDir
+ </> display (packageName pkgid) <.> "cabal"
+ info verbosity $
+ "Updating " ++ display (packageName pkgid) <.> "cabal"
+ ++ " with the latest revision from the index."
+ writeFileAtomic descFilePath (BS.unpack pkgtxt)
-- Configure phase
onFailure ConfigureFailed $ withJobLimit buildLimit $ do
View
2  cabal-install/Distribution/Client/InstallSymlink.hs
@@ -133,7 +133,7 @@ symlinkBinaries configFlags installFlags plan =
, PackageDescription.buildable (PackageDescription.buildInfo exe) ]
pkgDescription :: ConfiguredPackage -> PackageDescription
- pkgDescription (ConfiguredPackage (SourcePackage _ pkg _) flags stanzas _) =
+ pkgDescription (ConfiguredPackage (SourcePackage _ pkg _ _) flags stanzas _) =
case finalizePackageDescription flags
(const True)
platform compilerId [] (enableStanzas stanzas pkg) of
View
5 cabal-install/Distribution/Client/JobControl.hs
@@ -51,6 +51,7 @@ newSerialJobControl = do
collect = join . readChan
newParallelJobControl :: IO (JobControl IO a)
+#if MIN_VERSION_base(4,3,0)
newParallelJobControl = do
resultVar <- newEmptyMVar
return JobControl {
@@ -68,7 +69,9 @@ newParallelJobControl = do
collect :: MVar (Either SomeException a) -> IO a
collect resultVar =
takeMVar resultVar >>= either throw return
-
+#else
+newParallelJobControl = newSerialJobControl
+#endif
data JobLimit = JobLimit QSem
View
17 cabal-install/Distribution/Client/Setup.hs
@@ -475,13 +475,15 @@ instance Monoid ReportFlags where
data UnpackFlags = UnpackFlags {
unpackDestDir :: Flag FilePath,
- unpackVerbosity :: Flag Verbosity
+ unpackVerbosity :: Flag Verbosity,
+ unpackPristine :: Flag Bool
}
defaultUnpackFlags :: UnpackFlags
defaultUnpackFlags = UnpackFlags {
unpackDestDir = mempty,
- unpackVerbosity = toFlag normal
+ unpackVerbosity = toFlag normal,
+ unpackPristine = toFlag False
}
unpackCommand :: CommandUI UnpackFlags
@@ -498,14 +500,21 @@ unpackCommand = CommandUI {
"where to unpack the packages, defaults to the current directory."
unpackDestDir (\v flags -> flags { unpackDestDir = v })
(reqArgFlag "PATH")
+
+ , option [] ["pristine"]
+ ("Unpack the original pristine tarball, rather than updating the "
+ ++ ".cabal file with the latest revision from the package archive.")
+ unpackPristine (\v flags -> flags { unpackPristine = v })
+ trueArg
]
}
instance Monoid UnpackFlags where
mempty = defaultUnpackFlags
mappend a b = UnpackFlags {
- unpackDestDir = combine unpackDestDir
- ,unpackVerbosity = combine unpackVerbosity
+ unpackDestDir = combine unpackDestDir,
+ unpackVerbosity = combine unpackVerbosity,
+ unpackPristine = combine unpackPristine
}
where combine field = field a `mappend` field b
View
11 cabal-install/Distribution/Client/SetupWrapper.hs
@@ -70,7 +70,7 @@ import Distribution.Verbosity
import Distribution.Compat.Exception
( catchIO )
-import System.Directory ( doesFileExist )
+import System.Directory ( doesFileExist, canonicalizePath )
import System.FilePath ( (</>), (<.>) )
import System.IO ( Handle, hPutStr )
import System.Exit ( ExitCode(..), exitWith )
@@ -382,7 +382,14 @@ externalSetupMethod verbosity options pkg bt mkargs = do
Nothing -> return ()
Just logHandle -> info verbosity $ "Redirecting build log to "
++ show logHandle
- process <- runProcess path args
+
+ -- Since useWorkingDir can change the relative path, the path argument must
+ -- be turned into an absolute path. On some systems, runProcess will take
+ -- path as relative to the new working directory instead of the current
+ -- working directory.
+ path' <- canonicalizePath path
+
+ process <- runProcess path' args
(useWorkingDir options) Nothing
Nothing (useLoggingHandle options) (useLoggingHandle options)
exitCode <- waitForProcess process
View
14 cabal-install/Distribution/Client/Targets.hs
@@ -472,9 +472,10 @@ readPackageTarget verbosity target = case target of
pkg <- readPackageDescription verbosity =<< findPackageDesc dir
return $ PackageTargetLocation $
SourcePackage {
- packageInfoId = packageId pkg,
- packageDescription = pkg,
- packageSource = fmap Just location
+ packageInfoId = packageId pkg,
+ packageDescription = pkg,
+ packageSource = fmap Just location,
+ packageDescrOverride = Nothing
}
LocalTarballPackage tarballFile ->
@@ -497,9 +498,10 @@ readPackageTarget verbosity target = case target of
Just pkg ->
return $ PackageTargetLocation $
SourcePackage {
- packageInfoId = packageId pkg,
- packageDescription = pkg,
- packageSource = fmap Just location
+ packageInfoId = packageId pkg,
+ packageDescription = pkg,
+ packageSource = fmap Just location,
+ packageDescrOverride = Nothing
}
extractTarballPackageCabalFile :: FilePath -> String
View
12 cabal-install/Distribution/Client/Types.hs
@@ -29,6 +29,7 @@ import Distribution.Version
import Data.Map (Map)
import Network.URI (URI)
+import Data.ByteString.Lazy (ByteString)
import Distribution.Compat.Exception
( SomeException )
@@ -94,12 +95,17 @@ instance PackageFixedDeps ConfiguredPackage where
-- | A package description along with the location of the package sources.
--
data SourcePackage = SourcePackage {
- packageInfoId :: PackageId,
- packageDescription :: GenericPackageDescription,
- packageSource :: PackageLocation (Maybe FilePath)
+ packageInfoId :: PackageId,
+ packageDescription :: GenericPackageDescription,
+ packageSource :: PackageLocation (Maybe FilePath),
+ packageDescrOverride :: PackageDescriptionOverride
}
deriving Show
+-- | We sometimes need to override the .cabal file in the tarball with
+-- the newer one from the package index.
+type PackageDescriptionOverride = Maybe ByteString
+
instance Package SourcePackage where packageId = packageInfoId
data OptionalStanza
View
33 cabal-install/Distribution/Client/Unpack.hs
@@ -19,11 +19,11 @@ module Distribution.Client.Unpack (
) where
import Distribution.Package
- ( PackageId, packageId )
+ ( PackageId, packageId, packageName )
import Distribution.Simple.Setup
( fromFlag, fromFlagOrDefault )
import Distribution.Simple.Utils
- ( notice, die )
+ ( notice, die, info, writeFileAtomic )
import Distribution.Verbosity
( Verbosity )
import Distribution.Text(display)
@@ -45,8 +45,9 @@ import Control.Monad
import Data.Monoid
( mempty )
import System.FilePath
- ( (</>), addTrailingPathSeparator )
-
+ ( (</>), (<.>), addTrailingPathSeparator )
+import qualified Data.ByteString.Lazy.Char8 as BS
+ ( unpack )
unpack :: Verbosity
-> [Repo]
@@ -77,15 +78,17 @@ unpack verbosity repos globalFlags unpackFlags userTargets = do
flip mapM_ pkgs $ \pkg -> do
location <- fetchPackage verbosity (packageSource pkg)
let pkgid = packageId pkg
+ descOverride | usePristine = Nothing
+ | otherwise = packageDescrOverride pkg
case location of
LocalTarballPackage tarballPath ->
- unpackPackage verbosity prefix pkgid tarballPath
+ unpackPackage verbosity prefix pkgid descOverride tarballPath
RemoteTarballPackage _tarballURL tarballPath ->
- unpackPackage verbosity prefix pkgid tarballPath
+ unpackPackage verbosity prefix pkgid descOverride tarballPath
RepoTarballPackage _repo _pkgid tarballPath ->
- unpackPackage verbosity prefix pkgid tarballPath
+ unpackPackage verbosity prefix pkgid descOverride tarballPath
LocalUnpackedPackage _ ->
error "Distribution.Client.Unpack.unpack: the impossible happened."
@@ -97,6 +100,7 @@ unpack verbosity repos globalFlags unpackFlags userTargets = do
standardInstallPolicy mempty sourcePkgDb pkgSpecifiers
prefix = fromFlagOrDefault "" (unpackDestDir unpackFlags)
+ usePristine = fromFlagOrDefault False (unpackPristine unpackFlags)
checkTarget :: UserTarget -> IO ()
checkTarget target = case target of
@@ -108,8 +112,10 @@ checkTarget target = case target of
"The 'unpack' command is for tarball packages. "
++ "The target '" ++ t ++ "' is not a tarball."
-unpackPackage :: Verbosity -> FilePath -> PackageId -> FilePath -> IO ()
-unpackPackage verbosity prefix pkgid pkgPath = do
+unpackPackage :: Verbosity -> FilePath -> PackageId
+ -> PackageDescriptionOverride
+ -> FilePath -> IO ()
+unpackPackage verbosity prefix pkgid descOverride pkgPath = do
let pkgdirname = display pkgid
pkgdir = prefix </> pkgdirname
pkgdir' = addTrailingPathSeparator pkgdir
@@ -121,3 +127,12 @@ unpackPackage verbosity prefix pkgid pkgPath = do
"A file \"" ++ pkgdir ++ "\" is in the way, not unpacking."
notice verbosity $ "Unpacking to " ++ pkgdir'
Tar.extractTarGzFile prefix pkgdirname pkgPath
+
+ case descOverride of
+ Nothing -> return ()
+ Just pkgtxt -> do
+ let descFilePath = pkgdir </> display (packageName pkgid) <.> "cabal"
+ info verbosity $
+ "Updating " ++ descFilePath
+ ++ " with the latest revision from the index."
+ writeFileAtomic descFilePath (BS.unpack pkgtxt)
View
8 cabal-install/bootstrap.sh
@@ -49,11 +49,11 @@ PREFIX=${PREFIX:-${DEFAULT_PREFIX}}
# The version regex says what existing installed versions are ok.
PARSEC_VER="3.1.3"; PARSEC_VER_REGEXP="[23]\." # == 2.* || == 3.*
DEEPSEQ_VER="1.3.0.1"; DEEPSEQ_VER_REGEXP="1\.[1-9]\." # >= 1.1 && < 2
-TEXT_VER="0.11.2.3"; TEXT_VER_REGEXP="0\.([2-9]|(1[0-1]))\." # >= 0.2 && < 0.12
-NETWORK_VER="2.3.1.0"; NETWORK_VER_REGEXP="2\." # == 2.*
-CABAL_VER="1.16.0"; CABAL_VER_REGEXP="1\.(13\.3|1[4-7]\.)" # >= 1.13.3 && < 1.18
+TEXT_VER="0.11.2.3"; TEXT_VER_REGEXP="0\.([2-9]|(1[0-1]))\." # >= 0.2 && < 0.12
+NETWORK_VER="2.3.1.1"; NETWORK_VER_REGEXP="2\." # == 2.*
+CABAL_VER="1.16.0.2"; CABAL_VER_REGEXP="1\.1[67]\." # >= 1.16 && < 1.18
TRANS_VER="0.3.0.0"; TRANS_VER_REGEXP="0\.[23]\." # >= 0.2.* && < 0.4.*
-MTL_VER="2.1.2"; MTL_VER_REGEXP="[12]\." # == 1.* || == 2.*
+MTL_VER="2.1.2"; MTL_VER_REGEXP="[12]\." # == 1.* || == 2.*
HTTP_VER="4000.2.4"; HTTP_VER_REGEXP="4000\.[012]\." # == 4000.0.* || 4000.1.* || 4000.2.*
ZLIB_VER="0.5.4.0"; ZLIB_VER_REGEXP="0\.[45]\." # == 0.4.* || == 0.5.*
TIME_VER="1.4.0.1" TIME_VER_REGEXP="1\.[1234]\.?" # >= 1.1 && < 1.5
View
4 cabal-install/cabal-install.cabal
@@ -1,12 +1,12 @@
Name: cabal-install
-Version: 0.15.2
+Version: 1.16.0.1
Synopsis: The command-line interface for Cabal and Hackage.
Description:
The \'cabal\' command-line program simplifies the process of managing
Haskell software by automating the fetching, configuration, compilation
and installation of Haskell libraries and programs.
homepage: http://www.haskell.org/cabal/
-bug-reports: http://hackage.haskell.org/trac/hackage/
+bug-reports: https://github.com/haskell/cabal/issues
License: BSD3
License-File: LICENSE
Author: Lemmih <lemmih@gmail.com>

Showing you all comments on commits in this comparison.

@hvr
Owner

fyi, the remaining trailing , breaks compilation

@tibbe
Owner

Fixed in a separate commit.

Something went wrong with that request. Please try again.