From 58112d0c591bd03ee2b90beb7d569c3e98cdd908 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 18 Jun 2020 14:13:40 -0400 Subject: 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. --- src/Propellor/Bootstrap.hs | 7 +++++-- 1 file 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. -- cgit v1.2.3