diff options
| author | Sean Whitton <spwhitton@spwhitton.name> | 2017-11-13 10:50:58 -0700 |
|---|---|---|
| committer | Sean Whitton <spwhitton@spwhitton.name> | 2017-11-13 10:50:58 -0700 |
| commit | 6313fd5582adcec73fbf3186edebf8e31e46dbc5 (patch) | |
| tree | d64bf59561d7927d8e759fff8e1fd1cc7f72acca /src/Propellor/Property | |
| parent | f5a7b6b014b0425a9143d151286dc0e9539e6f69 (diff) | |
conditionalise union-type = overlay
Diffstat (limited to 'src/Propellor/Property')
| -rw-r--r-- | src/Propellor/Property/Sbuild.hs | 10 |
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") |
