summaryrefslogtreecommitdiff
path: root/src/Propellor
diff options
context:
space:
mode:
authorSean Whitton2017-01-15 18:55:54 -0700
committerJoey Hess2017-01-19 12:02:42 +1100
commitf00734ace53a291e64499f95e06c432af203f1b3 (patch)
tree1a9db7555046d0e9b29f9779fdd45c55f49ae7d6 /src/Propellor
parenta2a07c8b6a3a9d73f32b8615ba0ce4e7127bbbb3 (diff)
add Apt.noPDiffs
Diffstat (limited to 'src/Propellor')
-rw-r--r--src/Propellor/Property/Apt.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs
index 196fb345..c0d4ac82 100644
--- a/src/Propellor/Property/Apt.hs
+++ b/src/Propellor/Property/Apt.hs
@@ -349,5 +349,10 @@ hasForeignArch arch = check notAdded (add `before` update)
add = cmdProperty "dpkg" ["--add-architecture", arch]
`assume` MadeChange
+-- | Disable the use of PDiffs for machines with high-bandwidth connections.
+noPDiffs :: Property DebianLike
+noPDiffs = tightenTargets $ "/etc/apt/apt.conf.d/20pdiffs" `File.hasContent`
+ [ "Acquire::PDiffs \"false\";" ]
+
dpkgStatus :: FilePath
dpkgStatus = "/var/lib/dpkg/status"