[pkg-haskell-tools] 03/05: Better error message after failed build.

Joachim Breitner nomeata at moszumanska.debian.org
Fri Aug 14 09:03:20 UTC 2015


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

nomeata pushed a commit to branch master
in repository pkg-haskell-tools.

commit 6bc834a4fee9abe713e193063100224e719a2823
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Fri Aug 14 08:50:46 2015 +0200

    Better error message after failed build.
---
 src/make-all.hs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/make-all.hs b/src/make-all.hs
index 5a1fb19..9b833e9 100644
--- a/src/make-all.hs
+++ b/src/make-all.hs
@@ -336,7 +336,11 @@ shakeMain conf@(Conf {..}) = do
     targetDir </> "*.changes" %> \out -> do
         let filename = takeFileName out
         let [source,version,_] = splitOn "_" filename
-        need [targetDir </> logFileName source version]
+        let logfile = targetDir </> logFileName source version
+        need [logfile]
+        ok <- doesFileExist out
+        unless ok $ fail $ "Building " ++ source ++ " failed, remove " ++ logfile ++ " to retry."
+
 
     -- Build log depends on the corresponding source, and the dependencies
     targetDir </> "*.build" %> \out -> do

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



More information about the Pkg-haskell-commits mailing list