summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess2020-08-27 21:40:32 -0400
committerJoey Hess2020-08-27 21:40:40 -0400
commit14b255cb5cdf7911519d5da0f319c8517986f5c9 (patch)
tree7428daa11a0daecf373259acc24d1594672bfdcd
parentc6226596e0bfa12536a643100ef5016fd0906799 (diff)
use libghc-type-errors-dev when available
Added libghc-type-errors-dev to debian/control recommends, and install it if available when bootstrapping propellor. At a future point, this can be converted to a dependency. This commit was sponsored by Jochen Bartl on Patreon.
-rw-r--r--debian/changelog7
-rw-r--r--debian/control2
-rw-r--r--src/Propellor/Bootstrap.hs7
3 files changed, 14 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 5ddbca1c..849d132d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+propellor (5.12) UNRELEASED; urgency=medium
+
+ * Added libghc-type-errors-dev to debian/control recommends, and
+ install it if available when bootstrapping propellor.
+
+ -- Joey Hess <id@joeyh.name> Thu, 27 Aug 2020 20:57:48 -0400
+
propellor (5.11) unstable; urgency=medium
* Fix display of concurrent output from processes when using
diff --git a/debian/control b/debian/control
index 5a46822f..ef1a7ca4 100644
--- a/debian/control
+++ b/debian/control
@@ -18,6 +18,7 @@ Build-Depends:
libghc-exceptions-dev (>= 0.6),
libghc-text-dev,
libghc-hashable-dev,
+ libghc-type-errors-dev,
Maintainer: Joey Hess <id@joeyh.name>
Standards-Version: 3.9.8
Vcs-Git: git://git.joeyh.name/propellor
@@ -42,6 +43,7 @@ Depends: ${misc:Depends}, ${shlibs:Depends},
libghc-text-dev,
libghc-hashable-dev,
git (>= 2.0),
+Recommends: libghc-type-errors-dev,
Description: property-based host configuration management in haskell
Propellor ensures that the system it's run in satisfies a list of
properties, taking action as necessary when a property is not yet met.
diff --git a/src/Propellor/Bootstrap.hs b/src/Propellor/Bootstrap.hs
index 6aa5720c..0fe01421 100644
--- a/src/Propellor/Bootstrap.hs
+++ b/src/Propellor/Bootstrap.hs
@@ -103,7 +103,7 @@ 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
+data Dep = Dep String | OptDep String | OldDep String
-- Install build dependencies of propellor, using the specified
-- Bootstrapper.
@@ -139,7 +139,8 @@ depsCommand bs msys = "( " ++ intercalate " ; " (go bs) ++ ") || true"
useapt builder = "apt-get update" : map aptinstall (debdeps builder)
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"
+ aptinstall (OptDep p) = "if LANG=C apt-cache policy " ++ p ++ "| grep -q Candidate:; then " ++ aptinstall (Dep p) ++ "; fi"
+ aptinstall (OldDep p) = aptinstall (OptDep p)
pkginstall p = "ASSUME_ALWAYS_YES=yes pkg install " ++ p
pacmaninstall p = "pacman -S --noconfirm --needed " ++ p
@@ -160,6 +161,8 @@ depsCommand bs msys = "( " ++ intercalate " ; " (go bs) ++ ") || true"
, Dep "libghc-exceptions-dev"
, Dep "libghc-text-dev"
, Dep "libghc-hashable-dev"
+ -- Deps that can be skipped on old systems.
+ , OptDep "libghc-type-errors-dev"
-- Deps that are only needed on old systems.
, OldDep "libghc-stm-dev"
]