matchesPkg: match against the pkg Id (foo-1.0) not just the package name (foo)
authorSimon Marlow <simonmar@microsoft.com>
Tue, 5 Feb 2008 09:04:29 +0000 (09:04 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Tue, 5 Feb 2008 09:04:29 +0000 (09:04 +0000)
Fixes the ghcpkg01 test.

utils/ghc-pkg/Main.hs

index 936b309..866c9fe 100644 (file)
@@ -624,7 +624,7 @@ pid `matches` pid'
 
 matchesPkg :: PackageArg -> InstalledPackageInfo -> Bool
 (Id pid)        `matchesPkg` pkg = pid `matches` package pkg
-(Substring _ m) `matchesPkg` pkg = m (pkgName (package pkg))
+(Substring _ m) `matchesPkg` pkg = m (showPackageId (package pkg))
 
 compPkgIdVer :: PackageIdentifier -> PackageIdentifier -> Ordering
 compPkgIdVer p1 p2 = pkgVersion p1 `compare` pkgVersion p2