summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Sbuild.hs
diff options
context:
space:
mode:
authorSean Whitton2017-11-13 10:50:58 -0700
committerSean Whitton2017-11-13 10:50:58 -0700
commit6313fd5582adcec73fbf3186edebf8e31e46dbc5 (patch)
treed64bf59561d7927d8e759fff8e1fd1cc7f72acca /src/Propellor/Property/Sbuild.hs
parentf5a7b6b014b0425a9143d151286dc0e9539e6f69 (diff)
conditionalise union-type = overlay
Diffstat (limited to 'src/Propellor/Property/Sbuild.hs')
-rw-r--r--src/Propellor/Property/Sbuild.hs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Propellor/Property/Sbuild.hs b/src/Propellor/Property/Sbuild.hs
index f96435cf..326d6506 100644
--- a/src/Propellor/Property/Sbuild.hs
+++ b/src/Propellor/Property/Sbuild.hs
@@ -142,12 +142,18 @@ built' cc (Props ps) suite arch = provisioned <!> deleted
& pair "profile" "sbuild"
& pair "type" "directory"
& pair "directory" schrootRoot
- -- TODO conditionalise (fold into overlayKernels prop?)
- & pair "union-type" "overlay"
+ & unionTypeOverlay
& pair "command-prefix" (intercalate "," commandPrefix)
where
pair k v = ConfFile.containsIniSetting schrootConf
(suiteArch ++ "-sbuild", k, v)
+ unionTypeOverlay :: Property DebianLike
+ unionTypeOverlay = property' "add union-type = overlay" $ \w ->
+ Schroot.usesOverlays >>= \usesOverlays ->
+ if usesOverlays
+ then ensureProperty w $
+ pair "union-type" "overlay"
+ else noChange
compatSymlink = File.isSymlinkedTo
("/etc/sbuild/chroot" </> suiteArch ++ "-sbuild")