Commit d9265390 authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Change dependencyInconsistencies to not take the pseudo top package

The one case where we need the pseudo top package we can use
PackageIndex.insert instead to get the same effect and there
are other cases in cabal-install where we do not want a pseudo
top package.
parent 12cc66f7
......@@ -356,7 +356,9 @@ configure (pkg_descr0, pbi) cfg
InstalledPackageInfo.package = packageId pkg_descr,
InstalledPackageInfo.depends = dep_pkgs
}
case PackageIndex.dependencyInconsistencies packageDependsIndex pseudoTopPkg of
case PackageIndex.dependencyInconsistencies
. PackageIndex.insert pseudoTopPkg
$ packageDependsIndex of
[] -> return ()
inconsistencies ->
warn verbosity $
......
......@@ -281,9 +281,8 @@ dependencyClosure index pkgids0 = case closure [] [] pkgids0 of
--
dependencyInconsistencies :: PackageFixedDeps pkg
=> PackageIndex pkg
-> pkg
-> [(String, [(PackageIdentifier, Version)])]
dependencyInconsistencies index topPkg =
dependencyInconsistencies index =
[ (name, inconsistencies)
| (name, uses) <- Map.toList inverseIndex
, let inconsistencies = duplicatesBy uses
......@@ -291,7 +290,7 @@ dependencyInconsistencies index topPkg =
where inverseIndex = Map.fromListWith (++)
[ (packageName dep, [(packageId pkg, packageVersion dep)])
| pkg <- topPkg : allPackages index
| pkg <- allPackages index
, dep <- depends pkg ]
duplicatesBy = (\groups -> if length groups == 1
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment