haskell-updater 1.3 → 1.3.1
raw patch · 3 files changed
+16/−5 lines, 3 files
Files
- Distribution/Gentoo/GHC.hs +13/−2
- Main.hs +2/−2
- haskell-updater.cabal +1/−1
Distribution/Gentoo/GHC.hs view
@@ -22,7 +22,7 @@ import Distribution.Gentoo.Packages -- Cabal imports-import Distribution.Simple.Utils(rawSystemStdInOut)+import qualified Distribution.Simple.Utils as DSU import Distribution.Verbosity(silent) import Distribution.Package(PackageIdentifier, packageId) import Distribution.InstalledPackageInfo(InstalledPackageInfo)@@ -35,6 +35,7 @@ import qualified Data.List as L import qualified Data.Map as Map import qualified Data.ByteString.Char8 as BS+import qualified Data.ByteString.Lazy.Char8 as BL8 import System.FilePath((</>), takeExtension, pathSeparator) import System.Directory( canonicalizePath , doesDirectoryExist@@ -52,7 +53,8 @@ rawSysStdOutLine app = liftM (head . lines) . rawCommand app rawCommand :: FilePath -> [String] -> IO String-rawCommand cmd args = do (out,_,_) <- rawSystemStdInOut silent -- verbosity+rawCommand cmd args = do (out,_,_) <- DSU.rawSystemStdInOut+ silent -- verbosity cmd -- program loc args -- args #if MIN_VERSION_Cabal(1,18,0)@@ -60,8 +62,17 @@ Nothing -- cabal-1.18+: new environment #endif /* MIN_VERSION_Cabal(1,18,0) */ Nothing -- input text and binary mode+#if MIN_VERSION_Cabal(2,1,0)+ DSU.IODataModeBinary+#else False -- is output in binary mode+#endif /* MIN_VERSION_Cabal(2,1,0) */+#if MIN_VERSION_Cabal(2,1,0)+ case out of+ ~(DSU.IODataBinary bs) -> return (BL8.unpack bs)+#else return out+#endif /* MIN_VERSION_Cabal(2,1,0) */ -- Get the first line of output from calling GHC with the given -- arguments.
Main.hs view
@@ -55,7 +55,7 @@ dumpHistory v historyMap = do say v "Updater's past history:" CM.forM_ historyList $ \(n, entry) ->- say v $ unwords $ ["Pass", show n, " : "] ++ map printPkg (Set.toList entry)+ say v $ unwords $ ["Pass", show n, ":"] ++ map printPkg (Set.toList entry) where historyList :: [(Int, Set.Set Package)] historyList = L.sort [ (n, entry) | (entry, n) <- M.toList historyMap ] @@ -75,8 +75,8 @@ CM.when (null ps) $ success (verbosity rm) "\nNothing to build!" CM.when (Set.fromList ps `M.member` pastHistory) $ do- say v "Updater stuck in the loop and can't progress" dumpHistory v pastHistory+ die "Updater stuck in the loop and can't progress" exitCode <- buildPkgs rm ps
haskell-updater.cabal view
@@ -1,6 +1,6 @@ Name: haskell-updater Homepage: https://haskell.org/haskellwiki/Gentoo#haskell-updater-Version: 1.3+Version: 1.3.1 Synopsis: Rebuild Haskell dependencies in Gentoo Description: haskell-updater rebuilds Haskell packages on Gentoo after a GHC upgrade or a dependency upgrade.