Skip to content

Commit

Permalink
Distribution.Gentoo.GHC: silence 'oldGhcPkgs'
Browse files Browse the repository at this point in the history
Moved all the code spamming to console out from 'oldGhcPkgs'
to main module.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
  • Loading branch information
Sergei Trofimovich committed Jul 1, 2012
1 parent 6d67668 commit f9f1eed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 1 addition & 4 deletions Distribution/Gentoo/GHC.hs
Expand Up @@ -167,16 +167,13 @@ checkPkgs msg typ (pns,cnfs)

-- Finding packages installed with other versions of GHC
oldGhcPkgs :: IO [Package]
oldGhcPkgs = do putStrLn "Searching for packages installed with a \
\different version of GHC."
thisGhc <- ghcLibDir
oldGhcPkgs = do thisGhc <- ghcLibDir
let thisGhc' = BS.pack thisGhc
-- It would be nice to do this, but we can't assume
-- some crazy user hasn't deleted one of these dirs
-- libFronts' <- filterM doesDirectoryExist libFronts
pkgs <- liftM notGHC
$ concatMapM (checkLibDir thisGhc') libFronts
pkgListPrint "old" pkgs
return pkgs

-- Find packages installed by other versions of GHC in this possible
Expand Down
6 changes: 5 additions & 1 deletion Main.hs
Expand Up @@ -79,7 +79,11 @@ data BuildTarget = GhcUpgrade
deriving (Eq, Ord, Show, Read)

getPackages :: BuildTarget -> IO [Package]
getPackages GhcUpgrade = oldGhcPkgs
getPackages GhcUpgrade =
do putStrLn "Searching for packages installed with a different version of GHC."
pkgs <- oldGhcPkgs
pkgListPrint "old" pkgs
return pkgs
getPackages DepCheck = brokenPkgs
getPackages AllInstalled =
do putStrLn "Finding all libraries installed with the current version of GHC."
Expand Down

0 comments on commit f9f1eed

Please sign in to comment.