summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoey Hess2018-12-04 14:39:35 -0400
committerJoey Hess2018-12-04 15:18:48 -0400
commitd2a526833f7178a04b00704890cf6ee8c1187618 (patch)
tree72f678d109304890db0d58470d709f5352f68c72 /src
parent3a9b98f21c3e623006b596dfcf08a079f6212102 (diff)
libghc-stm-dev package won't be in new versions of debian
In Bootstrap, still try to install the package to support bootstrapping to old systems. If it's not available the bootstrapping will still succeed. The added apt-cache check is only to avoid apt complaining when asked to install a not available package. In debian/control, depend on ghc that includes stm, although propellor still supports being used with older versions of ghc Of course this control file is not being used for the package in debian any longer afaik, so something else will be done there.
Diffstat (limited to 'src')
-rw-r--r--src/Propellor/Bootstrap.hs42
1 files changed, 23 insertions, 19 deletions
diff --git a/src/Propellor/Bootstrap.hs b/src/Propellor/Bootstrap.hs
index 66e6e1ff..6ca133cb 100644
--- a/src/Propellor/Bootstrap.hs
+++ b/src/Propellor/Bootstrap.hs
@@ -95,6 +95,8 @@ checkDepsCommand bs sys = go (getBuilder bs)
go Cabal = "if ! cabal configure >/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"
+data Dep = Dep String | OldDep String
+
-- Install build dependencies of propellor, using the specified
-- Bootstrapper.
--
@@ -128,32 +130,34 @@ depsCommand bs msys = "( " ++ intercalate " ; " (go bs) ++ ") || true"
useapt builder = "apt-get update" : map aptinstall (debdeps builder)
- aptinstall p = "DEBIAN_FRONTEND=noninteractive apt-get -qq --no-upgrade --no-install-recommends -y install " ++ p
+ aptinstall (Dep p) = "DEBIAN_FRONTEND=noninteractive apt-get -qq --no-upgrade --no-install-recommends -y install " ++ p
+ aptinstall (OldDep p) = "if LANG=C apt-cache policy " ++ p ++ "| grep -q Candidate:; then " ++ aptinstall (Dep p) ++ "; fi"
pkginstall p = "ASSUME_ALWAYS_YES=yes pkg install " ++ p
pacmaninstall p = "pacman -S --noconfirm --needed " ++ p
debdeps Cabal =
- [ "gnupg"
+ [ Dep "gnupg"
-- Below are the same deps listed in debian/control.
- , "ghc"
- , "cabal-install"
- , "libghc-async-dev"
- , "libghc-split-dev"
- , "libghc-hslogger-dev"
- , "libghc-unix-compat-dev"
- , "libghc-ansi-terminal-dev"
- , "libghc-ifelse-dev"
- , "libghc-network-dev"
- , "libghc-mtl-dev"
- , "libghc-transformers-dev"
- , "libghc-exceptions-dev"
- , "libghc-stm-dev"
- , "libghc-text-dev"
- , "libghc-hashable-dev"
+ , Dep "ghc"
+ , Dep "cabal-install"
+ , Dep "libghc-async-dev"
+ , Dep "libghc-split-dev"
+ , Dep "libghc-hslogger-dev"
+ , Dep "libghc-unix-compat-dev"
+ , Dep "libghc-ansi-terminal-dev"
+ , Dep "libghc-ifelse-dev"
+ , Dep "libghc-network-dev"
+ , Dep "libghc-mtl-dev"
+ , Dep "libghc-transformers-dev"
+ , Dep "libghc-exceptions-dev"
+ , Dep "libghc-text-dev"
+ , Dep "libghc-hashable-dev"
+ -- Deps that are only needed on old systems.
+ , OldDep "libghc-stm-dev"
]
debdeps Stack =
- [ "gnupg"
- , "haskell-stack"
+ [ Dep "gnupg"
+ , Dep "haskell-stack"
]
fbsddeps Cabal =