From 14b255cb5cdf7911519d5da0f319c8517986f5c9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 27 Aug 2020 21:40:32 -0400 Subject: 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. --- debian/changelog | 7 +++++++ debian/control | 2 ++ src/Propellor/Bootstrap.hs | 7 +++++-- 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 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 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" ] -- cgit v1.2.3