haskell-updater 1.2.0.3 → 1.2.0.4
raw patch · 6 files changed
+15/−18 lines, 6 files
Files
- Distribution/Gentoo/GHC.hs +0/−1
- Distribution/Gentoo/Packages.hs +0/−1
- Distribution/Gentoo/PkgManager.hs +2/−3
- Distribution/Gentoo/Util.hs +0/−1
- Main.hs +12/−11
- haskell-updater.cabal +1/−1
Distribution/Gentoo/GHC.hs view
@@ -3,7 +3,6 @@ Description : Find GHC-related breakages on Gentoo. Copyright : (c) Ivan Lazar Miljenovic 2009 License : GPL-2 or later- Maintainer : Ivan.Miljenovic@gmail.com This module defines helper functions to find broken packages in GHC, or else find packages installed with older versions of GHC.
Distribution/Gentoo/Packages.hs view
@@ -3,7 +3,6 @@ Description : Dealing with installed packages on Gentoo. Copyright : (c) Ivan Lazar Miljenovic, Lennart Kolmodin 2009 License : GPL-2 or later- Maintainer : Ivan.Miljenovic@gmail.com This module defines helper functions that deal with installed packages in Gentoo.
Distribution/Gentoo/PkgManager.hs view
@@ -3,7 +3,6 @@ Description : Using package managers in Gentoo. Copyright : (c) Ivan Lazar Miljenovic, Emil Karlson 2010 License : GPL-2 or later- Maintainer : Ivan.Miljenovic@gmail.com This module defines ways to use different Gentoo package managers. -}@@ -106,8 +105,8 @@ defaultPMFlags CustomPM{} = [] defaultPMFlags (InvalidPM _) = undefined -buildCmd :: PkgManager -> [PMFlag] -> [String] -> [Package] -> String-buildCmd pm fs raw_pm_flags ps = unwords $ pmCommand pm : fs' ++ ps'+buildCmd :: PkgManager -> [PMFlag] -> [String] -> [Package] -> (String, [String])+buildCmd pm fs raw_pm_flags ps = (pmCommand pm, fs' ++ ps') where fs' = defaultPMFlags pm ++ mapMaybe (flagRep pm) fs ++ raw_pm_flags ps' = map printPkg ps
Distribution/Gentoo/Util.hs view
@@ -3,7 +3,6 @@ Description : Utility functions Copyright : (c) Ivan Lazar Miljenovic 2009 License : GPL-2 or later- Maintainer : Ivan.Miljenovic@gmail.com Common utility functions. -}
Main.hs view
@@ -3,7 +3,6 @@ Description : The haskell-updater executable Copyright : (c) Ivan Lazar Miljenovic, Stephan Friedrichs, Emil Karlson 2010 License : GPL-2 or later- Maintainer : Ivan.Miljenovic@gmail.com The executable module of haskell-updater, which finds Haskell packages to rebuild after a dep upgrade or a GHC upgrade.@@ -25,8 +24,8 @@ import System.Environment(getArgs, getProgName) import System.Exit(ExitCode(..), exitWith) import System.IO(hPutStrLn, stderr)-import Control.Monad(liftM, liftM2, unless)-import System.Process(system)+import Control.Monad(liftM, unless)+import System.Process(rawSystem) -- ----------------------------------------------------------------------------- -- The overall program.@@ -102,19 +101,21 @@ | PrintAndRun deriving (Eq, Ord, Show, Read) -runCmd :: WithCmd -> String -> IO a-runCmd RunOnly = runCommand-runCmd PrintOnly = success-runCmd PrintAndRun = liftM2 (>>) putStrLn runCommand+runCmd :: WithCmd -> String -> [String] -> IO a+runCmd mode cmd args = case mode of+ RunOnly -> runCommand cmd args+ PrintOnly -> success cmd_line+ PrintAndRun -> putStrLn cmd_line >> runCommand cmd args+ where cmd_line = unwords (cmd:args) -runCommand :: String -> IO a-runCommand cmd = system cmd >>= exitWith+runCommand :: String -> [String] -> IO a+runCommand cmd args = rawSystem cmd args >>= exitWith buildPkgs :: RunModifier -> [Package] -> IO a buildPkgs _ [] = success "\nNothing to build!"-buildPkgs rm ps = runCmd (withCmd rm) cmd+buildPkgs rm ps = runCmd (withCmd rm) cmd args where- cmd = buildCmd (pkgmgr rm) (flags rm) (rawPMArgs rm) ps+ (cmd, args) = buildCmd (pkgmgr rm) (flags rm) (rawPMArgs rm) ps -- ----------------------------------------------------------------------------- -- Command-line flags
haskell-updater.cabal view
@@ -1,6 +1,6 @@ Name: haskell-updater Homepage: http://haskell.org/haskellwiki/Gentoo#haskell-updater-Version: 1.2.0.3+Version: 1.2.0.4 Synopsis: Rebuild Haskell dependencies in Gentoo Description: haskell-updater rebuilds Haskell packages on Gentoo after a GHC upgrade or a dependency upgrade.