diff options
| author | Sean Whitton <spwhitton@spwhitton.name> | 2016-05-22 10:21:52 +0900 |
|---|---|---|
| committer | Sean Whitton <spwhitton@spwhitton.name> | 2016-05-22 10:21:52 +0900 |
| commit | 185a53d48b58c089eb9de3a8a1b47347841a65e8 (patch) | |
| tree | 2681285ac42a6a9e795ca81cfab457ded9471c67 /src | |
| parent | 47fbeac70e53e97d0ea42fafad8078c0d9d4d9f7 (diff) | |
be more careful setting sbuild ccache limits
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/Sbuild.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Propellor/Property/Sbuild.hs b/src/Propellor/Property/Sbuild.hs index df9c5a37..2cbe532a 100644 --- a/src/Propellor/Property/Sbuild.hs +++ b/src/Propellor/Property/Sbuild.hs @@ -313,7 +313,11 @@ keypairGenerated = check (not <$> doesFileExist secKeyFile) $ go -- another script from wiki.d.o/sbuild ccachePrepared :: Property DebianLike ccachePrepared = propertyList "sbuild group ccache configured" $ props - & Group "sbuild" `Ccache.hasCache` (Ccache.MaxSize "2G") + -- We only set a limit on the cache if it doesn't already exist, so the + -- user can override our default limit + & check (not <$> doesDirectoryExist "/var/cache/ccache-sbuild") + (Ccache.hasLimits "/var/cache/ccache-sbuild" (Ccache.MaxSize "2G")) + `before` Ccache.hasCache (Group "sbuild") Ccache.NoLimit & "/etc/schroot/sbuild/fstab" `File.containsLine` "/var/cache/ccache-sbuild /var/cache/ccache-sbuild none rw,bind 0 0" `describe` "ccache mounted in sbuild schroots" |
