Commit bc81a6a5 authored by Simon Marlow's avatar Simon Marlow
Browse files

FIX #1750: in isBrokenPackage, don't loop if the deps are recursive

parent a4cb9b55
......@@ -720,11 +720,16 @@ missingPackageDeps :: InstalledPackageInfo
-> [PackageIdentifier]
missingPackageDeps pkg pkg_map =
[ d | d <- depends pkg, isNothing (lookup d pkg_map)] ++
[ d | d <- depends pkg, Just p <- return (lookup d pkg_map), isBrokenPackage p pkg_map]
[ d | d <- depends pkg, Just p <- return (lookup d pkg_map),
isBrokenPackage p pkg_map]
isBrokenPackage :: InstalledPackageInfo -> [(PackageIdentifier, InstalledPackageInfo)] -> Bool
isBrokenPackage pkg pkg_map = not . null $ missingPackageDeps pkg pkg_map
isBrokenPackage pkg pkg_map
= not . null $ missingPackageDeps pkg (filter notme pkg_map)
where notme (p,ipi) = package pkg /= p
-- remove p from the database when we invoke missingPackageDeps,
-- because we want mutually recursive groups of package to show up
-- as broken. (#1750)
-- -----------------------------------------------------------------------------
-- Manipulating package.conf files
......
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