projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a4cb9b5
)
FIX #1750: in isBrokenPackage, don't loop if the deps are recursive
author
Simon Marlow
<simonmar@microsoft.com>
Wed, 23 Jan 2008 16:07:03 +0000
(16:07 +0000)
committer
Simon Marlow
<simonmar@microsoft.com>
Wed, 23 Jan 2008 16:07:03 +0000
(16:07 +0000)
utils/ghc-pkg/Main.hs
patch
|
blob
|
history
diff --git
a/utils/ghc-pkg/Main.hs
b/utils/ghc-pkg/Main.hs
index
416ecc1
..
6fa1e6b
100644
(file)
--- a/
utils/ghc-pkg/Main.hs
+++ b/
utils/ghc-pkg/Main.hs
@@
-720,11
+720,16
@@
missingPackageDeps :: InstalledPackageInfo
-> [PackageIdentifier]
missingPackageDeps pkg pkg_map =
[ d | d <- depends pkg, isNothing (lookup d pkg_map)] ++
-> [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 :: 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
-- -----------------------------------------------------------------------------
-- Manipulating package.conf files