summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton2016-05-19 14:09:01 +0900
committerSean Whitton2016-05-19 14:09:01 +0900
commit101fd0f882df8137c3d8ae1345b25801b180d2ac (patch)
tree7744618be3c75cba5ba9234bf8085fdefccbce3f
parentdb0245d9d96c4235563e4314102b114b028d72d0 (diff)
more lines into the schroot config
-rw-r--r--src/Propellor/Property/Sbuild.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Propellor/Property/Sbuild.hs b/src/Propellor/Property/Sbuild.hs
index 8f6629fb..c5bf30c0 100644
--- a/src/Propellor/Property/Sbuild.hs
+++ b/src/Propellor/Property/Sbuild.hs
@@ -80,7 +80,7 @@ builtFor system = case schrootFromSystem system of
-- TODO should be revertable (and that should carry through to builtFor)
-- | Build and configure a schroot for use with sbuild
built :: SbuildSchroot -> Apt.Url -> Property DebianLike
-built s mirror = check (not <$> doesDirectoryExist (schrootRoot s)) $
+built s@(SbuildSchroot suite arch) mirror = check (not <$> doesDirectoryExist (schrootRoot s)) $
property ("built schroot for " ++ show s) go
`requires` keypairGenerated
`requires` installed
@@ -98,6 +98,13 @@ built s mirror = check (not <$> doesDirectoryExist (schrootRoot s)) $
ifM (boolSystemEnv "sbuild-createchroot" params (Just de))
( do
fixConfFile s
+ -- if we just built a sid chroot, add useful aliases
+ when (suite == "unstable") $ ensureProperty $
+ File.containsLine (schrootConf s)
+ "aliases=UNRELEASED,sid,rc-buggy,experimental"
+ -- enable ccache and eatmydata for speed
+ ensureProperty $ File.containsLine (schrootConf s)
+ "command-prefix=/var/cache/ccache-sbuild/sbuild-setup,eatmydata"
return MadeChange
, return FailedChange
)