From 185a53d48b58c089eb9de3a8a1b47347841a65e8 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 22 May 2016 10:21:52 +0900 Subject: be more careful setting sbuild ccache limits --- src/Propellor/Property/Sbuild.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Propellor/Property/Sbuild.hs') 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" -- cgit v1.2.3