summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2008-10-31 18:17:46 +0000
committerIan Lynagh <igloo@earth.li>2008-10-31 18:17:46 +0000
commit0f39a76981957c7120e42dda04c07f394692cfdb (patch)
tree44ee117b16d480126c1543dcc3e67f894c965f79
parentf6a9dff693c6723254273c73d7df503aa269d558 (diff)
downloadhaskell-0f39a76981957c7120e42dda04c07f394692cfdb.tar.gz
Refuse to register packages with unversioned dependencies; trac #1837
-rw-r--r--utils/ghc-pkg/Main.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs
index 8b33d7b145..39f7eebd86 100644
--- a/utils/ghc-pkg/Main.hs
+++ b/utils/ghc-pkg/Main.hs
@@ -519,6 +519,11 @@ registerPackage input my_flags auto_ghci_libs update force = do
pkg <- parsePackageInfo expanded
putStrLn "done."
+ let unversioned_deps = filter (not . realVersion) (depends pkg)
+ unless (null unversioned_deps) $
+ die ("Unversioned dependencies found: " ++
+ unwords (map display unversioned_deps))
+
let truncated_stack = dropWhile ((/= to_modify).fst) db_stack
-- truncate the stack for validation, because we don't allow
-- packages lower in the stack to refer to those higher up.