[Pkg-haskell-commits] [tools] 01/01: binNMUs: New option --present-problems

Joachim Breitner nomeata at moszumanska.debian.org
Wed Jun 10 10:31:27 UTC 2015


This is an automated email from the git hooks/post-receive script.

nomeata pushed a commit to branch master
in repository tools.

commit 95a827c98674a5eac8f1fc00f5b7a8030bc9c249
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Wed Jun 10 12:31:23 2015 +0200

    binNMUs: New option --present-problems
---
 binNMUs.hs | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/binNMUs.hs b/binNMUs.hs
index 28e2628..a362dc7 100644
--- a/binNMUs.hs
+++ b/binNMUs.hs
@@ -96,7 +96,7 @@ run conf = do
     -- Parallelization, if required
     --let cBinNMUs = concat (cBinNMUss `using` parList (evalList (evalTuple2 rseq rseq)))
     let cBinNMUs = concat cBinNMUss
-    presentProblems cBinNMUs
+    doPresentProblems conf cBinNMUs
     presentBinNMUs conf cBinNMUs
 
 
@@ -115,8 +115,10 @@ printHeader conf = do
 
 -- | Presentation of binNMUs
 
-presentProblems :: [CBinNMU] -> IO ()
-presentProblems cBinNMUs
+doPresentProblems :: Conf -> [CBinNMU] -> IO ()
+doPresentProblems conf cBinNMUs
+    | not (presentProblems conf) = do
+        return ()
     | S.null problems  = do
         putCLn "No problems detected"
     | otherwise = do
@@ -507,9 +509,10 @@ data Conf = Conf
     , quiet :: Bool
     , sql :: Bool
     , groupPkgs :: Bool
+    , presentProblems :: Bool
     }
 
-mkConf :: String -> [Arch] -> String -> Bool -> Bool -> Bool -> Bool -> Conf
+mkConf :: String -> [Arch] -> String -> Bool -> Bool -> Bool -> Bool -> Bool -> Conf
 mkConf d a r =
     Conf d a (makeRegex ("^"++r++"$")) (makeRegex r) r
 
@@ -561,6 +564,10 @@ conf = mkConf
     long "group-pkgs" <>
     help "group commands for different packages (fewer, but longer lines)"
     )
+ <*> switch (
+    long "present-problems" <>
+    help "list all problems (changed dependencies etc.)"
+    )
 
 haskellRegex :: String
 haskellRegex = "libghc-(.*)-dev-([0-9.]+)-([0-9a-f]{5})"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-haskell/tools.git



More information about the Pkg-haskell-commits mailing list