Commit d3a696a3 authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Disable reinstalls with distinct package keys for now.



Duncan requested that cabal-install not try to put multiple entries in the
package database with duplicate package IDs (foo-0.1) until other tools (in
particular GHC) are able to deal with situation in a better way.  We want to
revert this commit soon, since with this turned on, we basically don't get any
benefit from the package key refactoring (no deliverance from Cabal hell.)
Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
parent 1d33c8f5
......@@ -530,20 +530,18 @@ extractReinstalls (Reinstall ipids _) = ipids
extractReinstalls _ = []
packageStatus :: Compiler -> PackageIndex -> ReadyPackage -> PackageStatus
packageStatus comp installedPkgIndex cpkg =
packageStatus _comp installedPkgIndex cpkg =
case PackageIndex.lookupPackageName installedPkgIndex
(packageName cpkg) of
[] -> NewPackage
ps -> case filter ((==pkg_key)
. Installed.packageKey) (concatMap snd ps) of
ps -> case filter ((== packageId cpkg)
. Installed.sourcePackageId) (concatMap snd ps) of
[] -> NewVersion (map fst ps)
pkgs@(pkg:_) -> Reinstall (map Installed.installedPackageId pkgs)
(changes pkg cpkg)
where
pkg_key = readyPackageKey comp cpkg
changes :: Installed.InstalledPackageInfo
-> ReadyPackage
-> [MergeResult PackageIdentifier PackageIdentifier]
......
Markdown is supported
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