[DHG_packages] 09/10: make-all: Shorter, more helpful error message when the build fails

Joachim Breitner nomeata at moszumanska.debian.org
Tue Aug 11 09:29:27 UTC 2015


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

nomeata pushed a commit to branch master
in repository DHG_packages.

commit 172db16910a7aa2559ecc228382005b54c47c3a6
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Tue Aug 11 11:29:01 2015 +0200

    make-all: Shorter, more helpful error message when the build fails
---
 make-all.hs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/make-all.hs b/make-all.hs
index 1758f94..3922d37 100644
--- a/make-all.hs
+++ b/make-all.hs
@@ -8,6 +8,7 @@ import Data.Maybe
 import Control.Monad
 import Text.Read
 import System.Directory.Extra
+import System.Exit
 
 import Options.Applicative hiding (many)
 import qualified Options.Applicative as O
@@ -275,8 +276,11 @@ shakeMain conf@(Conf {..}) = do
             liftIO $ writeFile fixup  $ fixupScript usedDeps
             localDebs <- filter ((==".deb").takeExtension) . map (makeRelative targetDir) <$> liftIO (listFiles targetDir)
             let debs = filter ((`S.member` usedDepsS) . debFileNameToPackage) localDebs
-            unit $ cmd (Cwd targetDir) (EchoStdout False)
+            Exit c <- cmd (Cwd targetDir) (EchoStdout False)
                 ["sbuild", "-c", "haskell","-A","--no-apt-update","--dist", distribution, "--chroot-setup-commands=bash "++fixup, dsc] ["--extra-package="++d | d <- debs]
+            unless (c == ExitSuccess) $ do
+                putNormal $ "Failed to build " ++ source ++ "_" ++ version
+                putNormal $ "See " ++ targetDir </> logFileName source version ++ " for details."
 
 
     -- Build log depends on the corresponding source, and the dependencies

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



More information about the Pkg-haskell-commits mailing list