From 3ae193011af030e0995eb88b152482fb4c4e6e3e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 13 Jul 2017 12:42:10 -0400 Subject: export Builder --- src/Propellor/Property/Bootstrap.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/Propellor/Property/Bootstrap.hs b/src/Propellor/Property/Bootstrap.hs index 93529c14..91d1a82f 100644 --- a/src/Propellor/Property/Bootstrap.hs +++ b/src/Propellor/Property/Bootstrap.hs @@ -3,6 +3,7 @@ module Propellor.Property.Bootstrap ( Bootstrapper(..), + Builder(..), bootstrapWith, RepoSource(..), bootstrappedFrom, -- cgit v1.3-2-g0d8e From bcc77819d0e6cb05225c55bf5b2473d4d97c0cbe Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 13 Jul 2017 12:48:03 -0400 Subject: use stack build --dry-run to check if deps are installed The system might have stack installed, so stack --version would succeed, but need stack setup to be run to get a working ghc. This will fail if stack is not installed, or if stack setup needs to be run. It does not fail when haskell libraries are not installed, but stack build will install those anyway, so that's ok. --- src/Propellor/Bootstrap.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Propellor/Bootstrap.hs b/src/Propellor/Bootstrap.hs index baf36e49..d3d0264b 100644 --- a/src/Propellor/Bootstrap.hs +++ b/src/Propellor/Bootstrap.hs @@ -86,13 +86,12 @@ buildCommand bs = intercalate " && " (go (getBuilder bs)) , "ln -sf $(stack path --dist-dir)/build/propellor-config propellor" ] --- Run cabal configure to check if all dependencies are installed; --- if not, run the depsCommand. +-- Check if all dependencies are installed; if not, run the depsCommand. checkDepsCommand :: Bootstrapper -> Maybe System -> ShellCommand checkDepsCommand bs sys = go (getBuilder bs) where go Cabal = "if ! cabal configure >/dev/null 2>&1; then " ++ depsCommand bs sys ++ "; fi" - go Stack = "if ! stack --version >/dev/null 2>&1; then " ++ depsCommand bs sys ++ "; fi" + go Stack = "if ! stack build --dry-run >/dev/null 2>&1; then " ++ depsCommand bs sys ++ "; fi" -- Install build dependencies of propellor, using the specified -- Bootstrapper. -- cgit v1.3-2-g0d8e From d2494a838ba0261cce063ff15bdd54b4a7c82231 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 13 Jul 2017 12:58:55 -0400 Subject: Updated stack config to lts-8.22. --- debian/changelog | 1 + src/Propellor/DotDir.hs | 2 +- stack.yaml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/debian/changelog b/debian/changelog index 4f151c78..160ff753 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,7 @@ propellor (4.3.3) UNRELEASED; urgency=medium Thanks, Félix Sipma. * Export a Restic.backup' property. Thanks, Félix Sipma. + * Updated stack config to lts-8.22. -- Joey Hess Mon, 10 Jul 2017 11:57:49 -0400 diff --git a/src/Propellor/DotDir.hs b/src/Propellor/DotDir.hs index ffde705c..f42c0575 100644 --- a/src/Propellor/DotDir.hs +++ b/src/Propellor/DotDir.hs @@ -316,7 +316,7 @@ minimalConfig = do ] stackResolver :: String -stackResolver = "lts-7.16" +stackResolver = "lts-8.22" fullClone :: IO Result fullClone = do diff --git a/stack.yaml b/stack.yaml index 3ed7bd27..f7377cc7 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ # When updating the resolver here, also update stackResolver in Propellor.DotDir -resolver: lts-7.16 +resolver: lts-8.22 packages: - '.' -- cgit v1.3-2-g0d8e From 102ee2aeacf4c3561da52c2552d759dd0ded4cc4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 13 Jul 2017 13:18:26 -0400 Subject: fix typo in build path --- src/Propellor/Bootstrap.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Propellor/Bootstrap.hs b/src/Propellor/Bootstrap.hs index d3d0264b..21f051c9 100644 --- a/src/Propellor/Bootstrap.hs +++ b/src/Propellor/Bootstrap.hs @@ -83,7 +83,7 @@ buildCommand bs = intercalate " && " (go (getBuilder bs)) ] go Stack = [ "stack build :propellor-config" - , "ln -sf $(stack path --dist-dir)/build/propellor-config propellor" + , "ln -sf $(stack path --dist-dir)/build/propellor-config/propellor-config propellor" ] -- Check if all dependencies are installed; if not, run the depsCommand. -- cgit v1.3-2-g0d8e