haskell-updater 1.2.7 → 1.2.8
raw patch · 3 files changed
+31/−22 lines, 3 files
Files
- Main.hs +22/−13
- Output.hs +8/−8
- haskell-updater.cabal +1/−1
Main.hs view
@@ -89,31 +89,40 @@ getPackages v target = case target of GhcUpgrade -> do say v "Searching for packages installed with a different version of GHC."+ say v "" pkgs <- oldGhcPkgs v- pkgListPrint v "old" pkgs+ pkgListPrintLn v "old" pkgs return pkgs - AllInstalled -> do say v "Finding all libraries installed with the current version of GHC."+ AllInstalled -> do say v "Searching for packages installed with the current version of GHC."+ say v "" pkgs <- allInstalledPackages- pkgListPrint v "installed" pkgs+ pkgListPrintLn v "installed" pkgs return pkgs DepCheck -> do say v "Searching for Haskell libraries with broken dependencies."+ say v "" (pkgs, unknown_packages, unknown_files) <- brokenPkgs v- printUnknownPackages unknown_packages- printUnknownFiles unknown_files- pkgListPrint v "broken" (notGHC pkgs)+ printUnknownPackagesLn unknown_packages+ printUnknownFilesLn unknown_files+ pkgListPrintLn v "broken" (notGHC pkgs) return pkgs - where printUnknownPackages [] = return ()- printUnknownPackages ps =- do say v "\nThe following packages don't seem to have been installed by your package manager:"+ where printUnknownPackagesLn [] = return ()+ printUnknownPackagesLn ps =+ do say v "The following packages are orphan (not installed by your package manager):" printList v id ps- printUnknownFiles [] = return ()- printUnknownFiles fs =- do say v $ "\nThe following files are those corresponding to packages installed by your package manager\n" ++- "which can't be matched up to the packages that own them."+ say v ""+ printUnknownFilesLn [] = return ()+ printUnknownFilesLn fs =+ do say v $ "The following files are orphan (not installed by your package manager):" printList v id fs+ say v $ "It is strongly advised to remove orphans:"+ say v $ " One of known sources of orphans is packages installed before 01 Jan 2015."+ say v $ " If you know it's your case you can easily remove such files:"+ say v $ " # rm -v -- `qfile -o $(ghc --print-libdir)/package.conf.d/*.conf`"+ say v $ " It will likely need one more 'haskell-updater' run."+ say v "" allGetPackages :: Verbosity -> Set.Set BuildTarget -> IO [Package] allGetPackages v = liftM nub
Output.hs view
@@ -6,7 +6,7 @@ Fancy output facility. -} module Output (- pkgListPrint+ pkgListPrintLn , printList , say , vsay@@ -42,11 +42,11 @@ printList v f = mapM_ (say v . (++) " * " . f) -- Print a list of packages, with a description of what they are.-pkgListPrint :: Verbosity -> String -> [Package] -> IO ()-pkgListPrint v desc pkgs- = if null pkgs- then say v $ unwords ["No", desc, "packages found!\n"]- else do say v $ unwords ["Found the following"+pkgListPrintLn :: Verbosity -> String -> [Package] -> IO ()+pkgListPrintLn v desc pkgs = do+ if null pkgs+ then say v $ unwords ["No", desc, "packages found!"]+ else do say v $ unwords ["Found the following" , desc, "packages:"]- printList v printPkg pkgs- say v ""+ printList v printPkg pkgs+ say v ""
haskell-updater.cabal view
@@ -1,6 +1,6 @@ Name: haskell-updater Homepage: http://haskell.org/haskellwiki/Gentoo#haskell-updater-Version: 1.2.7+Version: 1.2.8 Synopsis: Rebuild Haskell dependencies in Gentoo Description: haskell-updater rebuilds Haskell packages on Gentoo after a GHC upgrade or a dependency upgrade.