summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-06-18 15:44:16 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-06-18 15:44:16 -0400
commit6382a19494ebaa9bbac37b7fd43c347450a76ec3 (patch)
treecdb69a20d17617aa8d4605292637e64caff4fcb4 /Build
parent1d8c4d5d02cc045430f281395a2a0933f8be1e92 (diff)
better warnings
Diffstat (limited to 'Build')
-rw-r--r--Build/DistributionUpdate.hs12
1 files changed, 7 insertions, 5 deletions
diff --git a/Build/DistributionUpdate.hs b/Build/DistributionUpdate.hs
index 630ce0f9d..9319b37df 100644
--- a/Build/DistributionUpdate.hs
+++ b/Build/DistributionUpdate.hs
@@ -63,11 +63,15 @@ getbuild repodir (url, f) = do
let dest = repodir </> f
let tmp = dest ++ ".tmp"
nukeFile tmp
+ let oops s = do
+ nukeFile tmp
+ putStrLn $ "*** " ++ s
+ return Nothing
ifM (download url tmp def)
( do
bv2 <- getbv
case bv2 of
- Nothing -> return Nothing
+ Nothing -> oops $ "no build-version file for " ++ url
(Just v)
| bv2 == bv1 -> do
nukeFile dest
@@ -75,10 +79,8 @@ getbuild repodir (url, f) = do
-- remove git rev part of version
let v' = takeWhile (/= '-') v
return $ Just (f, v')
- | otherwise -> do
- nukeFile tmp
- error $ "build version changed while downloading " ++ url ++ " " ++ show (bv1, bv2)
- , return Nothing
+ | otherwise -> oops $ "build version changed while downloading " ++ url ++ " " ++ show (bv1, bv2)
+ , oops $ "failed to download " ++ url
)
where
getbv = do