summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Sbuild.hs
diff options
context:
space:
mode:
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")