summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess2020-06-18 14:13:40 -0400
committerJoey Hess2020-06-18 14:13:40 -0400
commit58112d0c591bd03ee2b90beb7d569c3e98cdd908 (patch)
tree499b930e5fecbf0ea3be6bfdafb6ae1cd1b3b2c8
parent06aa1967c931cbe3e00848af59a76ceb7e07b0a8 (diff)
stop using dist/setup-config as indication propellor is configured
cabal is changing to new-dist, and does not write setup-config in the same place. Instead, use a top-level "configured" stamp file. Same as the Makefile does now. This will lead to one extra run of cabal configure on each host, in order to get the new stamp file written. This commit was sponsored by Jochen Bartl on Patreon.
-rw-r--r--src/Propellor/Bootstrap.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Propellor/Bootstrap.hs b/src/Propellor/Bootstrap.hs
index d929c2cd..58ffa61b 100644
--- a/src/Propellor/Bootstrap.hs
+++ b/src/Propellor/Bootstrap.hs
@@ -262,7 +262,7 @@ buildPropellor mh = unlessM (actionMessage "Propellor build" build) $
-- dependencies and retries.
cabalBuild :: Maybe System -> IO Bool
cabalBuild msys = do
- make "dist/setup-config" ["propellor.cabal"] cabal_configure
+ make "configured" ["propellor.cabal"] cabal_configure
unlessM cabal_build $
unlessM (cabal_configure <&&> cabal_build) $
error "cabal build failed"
@@ -282,12 +282,15 @@ cabalBuild msys = do
cabalbuiltbin = "dist/build/propellor-config/propellor-config"
safetycopy = cabalbuiltbin ++ ".built"
cabal_configure = ifM (cabal ["configure"])
- ( return True
+ ( do
+ writeFile "configured" ""
+ return True
, case msys of
Nothing -> return False
Just sys ->
boolSystem "sh" [Param "-c", Param (depsCommand (Robustly Cabal) (Just sys))]
<&&> cabal ["configure"]
+ <&&> (writeFile "configured" "" >> return True)
)
-- The -j1 is to only run one job at a time -- in some situations,
-- eg in qemu, ghc does not run reliably in parallel.