Commit 45a8d0ce authored by Simon Marlow's avatar Simon Marlow

Packages are only shadowed if the InstalledPackageId is *different*

If the two InstalledPackageIds are the same, then the packages are
interchangeable and we don't need to explicitly remove one of them.
parent 41a80122
......@@ -556,12 +556,13 @@ shadowPackages pkgs preferred
in listToFM shadowed
where
check (shadowed,pkgmap) pkg
| Just oldpkg <- lookupUFM pkgmap (packageConfigId pkg)
= let
ipid_new = installedPackageId pkg
ipid_old = installedPackageId oldpkg
in
if ipid_old `elem` preferred
| Just oldpkg <- lookupUFM pkgmap (packageConfigId pkg),
let
ipid_new = installedPackageId pkg
ipid_old = installedPackageId oldpkg,
--
ipid_old /= ipid_new
= if ipid_old `elem` preferred
then ( (ipid_new, ShadowedBy ipid_old) : shadowed, pkgmap )
else ( (ipid_old, ShadowedBy ipid_new) : shadowed, pkgmap' )
| otherwise
......
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