cab 0.1.10 → 0.1.11
raw patch · 4 files changed
+15/−16 lines, 4 filesdep ~attoparsecdep ~attoparsec-conduitdep ~conduit
Dependency ranges changed: attoparsec, attoparsec-conduit, conduit, process-conduit
Files
- CmdDB.hs +1/−1
- Commands.hs +6/−6
- VerDB.hs +2/−3
- cab.cabal +6/−6
CmdDB.hs view
@@ -192,7 +192,7 @@ , commandNames = ["test"] , document = "run tests" , routing = RouteCabal ["test"]- , switches = []+ , switches = [(SwSandbox, Just "--sandbox")] , manual = Nothing } , CommandSpec {
Commands.hs view
@@ -71,11 +71,10 @@ db <- toPkgDB . flip toPkgList db' <$> userPkgs pkg <- lookupPkg nmver db let sortedPkgs = topSortedPkgs pkg db- if onlyOne && length sortedPkgs /= 1- then do+ if onlyOne && length sortedPkgs /= 1 then do hPutStrLn stderr "The following packages depend on this. Use the \"-r\" option." mapM_ (hPutStrLn stderr . fullNameOfPkgInfo) (init sortedPkgs)- else do+ else do unless doit $ putStrLn "The following packages are deleted without the \"-n\" option." mapM_ (unregister doit opts . pairNameOfPkgInfo) sortedPkgs where@@ -83,12 +82,13 @@ doit = OptNoharm `notElem` opts unregister :: Bool -> [Option] -> (String,String) -> IO ()-unregister doit opts (name,ver) = if doit- then do+unregister doit opts (name,ver) =+ if doit then do putStrLn $ "Deleting " ++ name ++ " " ++ ver pkgconf <- pkgConfOpt opts when doit $ system (script pkgconf) >> return ()- else putStrLn $ name ++ " " ++ ver+ else+ putStrLn $ name ++ " " ++ ver where script pkgconf = "ghc-pkg unregister " ++ pkgconf ++ name ++ "-" ++ ver
VerDB.hs view
@@ -35,15 +35,14 @@ verInfos = runResourceT $ sourceCmd script $$ cabalListParser justOnly = map (second fromJust) . filter (isJust . snd) + cabalListParser = sinkParser verinfos+ ---------------------------------------------------------------- lookupLatestVersion :: String -> VerDB -> Maybe [Int] lookupLatestVersion pkgid (VerDB db) = M.lookup pkgid db ------------------------------------------------------------------cabalListParser :: Sink ByteString IO [VerInfo]-cabalListParser = sinkParser verinfos verinfos :: Parser [VerInfo] verinfos = many1 verinfo
cab.cabal view
@@ -1,5 +1,5 @@ Name: cab-Version: 0.1.10+Version: 0.1.11 Author: Kazu Yamamoto <kazu@iij.ad.jp> Maintainer: Kazu Yamamoto <kazu@iij.ad.jp> License: BSD3@@ -25,15 +25,15 @@ GHC-Options: -Wall Build-Depends: base >= 4.0 && < 5 , Cabal- , attoparsec >= 0.10.0.0- , attoparsec-conduit+ , attoparsec >= 0.10+ , attoparsec-conduit >= 0.3 , bytestring- , conduit+ , conduit >= 0.3 , containers , directory , filepath , process- , process-conduit >= 0.0.0.3+ , process-conduit >= 0.1 if os(windows) Build-Depends: else@@ -50,4 +50,4 @@ Paths_cab Source-Repository head Type: git- Location: git clone git://github.com/kazu-yamamoto/cab.git+ Location: git://github.com/kazu-yamamoto/cab.git