summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSean Whitton2016-05-23 07:24:54 +0900
committerSean Whitton2016-05-23 07:24:54 +0900
commit97dab8b3136f3fb9c77b25f180ecb7b89e876e44 (patch)
tree05ae01d08a869e999ccf3110ee2cbd88d1990f12 /src
parent0b17dee7b9ea38e7d0342189cd16b19731fa2f61 (diff)
copy sample piuparts conf doc
Diffstat (limited to 'src')
-rw-r--r--src/Propellor/Property/Sbuild.hs18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/Propellor/Property/Sbuild.hs b/src/Propellor/Property/Sbuild.hs
index 2cbe532a..2647e69e 100644
--- a/src/Propellor/Property/Sbuild.hs
+++ b/src/Propellor/Property/Sbuild.hs
@@ -226,7 +226,8 @@ fixConfFile s@(SbuildSchroot suite arch) =
--
-- This function is a convenience wrapper around 'Sbuild.piupartsConf', allowing
-- the user to identify the schroot using the 'System' type. See that
--- function's documentation for why you might want to use this property
+-- function's documentation for why you might want to use this property, and
+-- sample config.
piupartsConfFor :: System -> Property DebianLike
piupartsConfFor sys = property' ("piuparts schroot conf for " ++ show sys) $
\w -> case (schrootFromSystem sys, stdMirror sys) of
@@ -239,12 +240,23 @@ piupartsConfFor sys = property' ("piuparts schroot conf for " ++ show sys) $
--
-- This is useful because:
--
--- - piuparts will clear out the apt cache which makes 'Sbuild.shareAptCache' much
--- less useful
+-- - piuparts will clear out the apt cache which makes 'Sbuild.shareAptCache'
+-- much less useful
--
-- - piuparts itself invokes eatmydata, so the command-prefix setting in our
-- regular schroot config would force the user to pass --no-eatmydata to
-- piuparts in their @~/.sbuildrc@, which is inconvenient.
+--
+-- To make use of this new schroot config, you can put something like this in
+-- your ~/.sbuildrc:
+--
+-- > $run_piuparts = 1;
+-- > $piuparts_opts = [
+-- > '--schroot',
+-- > 'unstable-i386-piuparts',
+-- > '--fail-if-inadequate',
+-- > '--fail-on-broken-symlinks',
+-- > ];
piupartsConf :: SbuildSchroot -> Apt.Url -> Property DebianLike
piupartsConf s u = go
`requires` (setupRevertableProperty $ built s u)