[commit: Cabal] master: merging changes from HEAD into modular-solver branch (6c2b08c)
Ian Lynagh
igloo at earth.li
Fri Nov 4 18:07:15 CET 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/6c2b08c83b56b96ba97a07f77e0e3c6285f89420
>---------------------------------------------------------------
commit 6c2b08c83b56b96ba97a07f77e0e3c6285f89420
Author: Andres Loeh <andres at well-typed.com>
Date: Tue Oct 25 06:36:32 2011 +0000
merging changes from HEAD into modular-solver branch
>---------------------------------------------------------------
cabal-install/Distribution/Client/IndexUtils.hs | 32 ++--------------------
cabal-install/Distribution/Client/Setup.hs | 5 +++-
2 files changed, 7 insertions(+), 30 deletions(-)
diff --git a/cabal-install/Distribution/Client/IndexUtils.hs b/cabal-install/Distribution/Client/IndexUtils.hs
index 86872be..b8343b0 100644
--- a/cabal-install/Distribution/Client/IndexUtils.hs
+++ b/cabal-install/Distribution/Client/IndexUtils.hs
@@ -85,35 +85,9 @@ getInstalledPackages verbosity comp packageDbs conf =
--FIXME: make getInstalledPackages use sensible verbosity in the first place
verbosity' = lessVerbose verbosity
- convert :: InstalledPackageIndex.PackageIndex -> PackageIndex InstalledPackage
- convert index = PackageIndex.fromList
- -- There can be multiple installed instances of each package version,
- -- like when the same package is installed in the global & user dbs.
- -- InstalledPackageIndex.allPackagesByName gives us the installed
- -- packages with the most preferred instances first, so by picking the
- -- first we should get the user one. This is almost but not quite the
- -- same as what ghc does.
- [ InstalledPackage ipkg (sourceDeps index ipkg)
- | ipkgs <- InstalledPackageIndex.allPackagesByName index
- , (ipkg:_) <- groupBy (equating packageVersion) ipkgs ]
-
- -- The InstalledPackageInfo only lists dependencies by the
- -- InstalledPackageId, which means we do not directly know the corresponding
- -- source dependency. The only way to find out is to lookup the
- -- InstalledPackageId to get the InstalledPackageInfo and look at its
- -- source PackageId. But if the package is broken because it depends on
- -- other packages that do not exist then we have a problem we cannot find
- -- the original source package id. Instead we make up a bogus package id.
- -- This should have the same effect since it should be a dependency on a
- -- non-existant package.
- sourceDeps index ipkg =
- [ maybe (brokenPackageId depid) packageId mdep
- | let depids = InstalledPackageInfo.depends ipkg
- getpkg = InstalledPackageIndex.lookupInstalledPackageId index
- , (depid, mdep) <- zip depids (map getpkg depids) ]
-
- brokenPackageId (InstalledPackageId str) =
- PackageIdentifier (PackageName (str ++ "-broken")) (Version [] [])
+------------------------------------------------------------------------
+-- Reading the source package index
+--
-- | Read a repository index from disk, from the local files specified by
-- a list of 'Repo's.
diff --git a/cabal-install/Distribution/Client/Setup.hs b/cabal-install/Distribution/Client/Setup.hs
index b382a19..6911480 100644
--- a/cabal-install/Distribution/Client/Setup.hs
+++ b/cabal-install/Distribution/Client/Setup.hs
@@ -612,7 +612,10 @@ defaultInstallFlags = InstallFlags {
where
docIndexFile = toPathTemplate ("$datadir" </> "doc" </> "index.html")
-installCommand :: CommandUI (ConfigFlags, ConfigExFlags, InstallFlags)
+defaultMaxBackjumps :: Int
+defaultMaxBackjumps = 200
+
+installCommand :: CommandUI (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags)
installCommand = CommandUI {
commandName = "install",
commandSynopsis = "Installs a list of packages.",
More information about the Cvs-libraries
mailing list