From 4a53b158a2b6ca5e64f45058b2e26fe0a0c579e9 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 21 May 2016 20:09:31 +0900 Subject: update Sbuild.hs for new Ccache.hs --- src/Propellor/Property/Ccache.hs | 4 ++-- src/Propellor/Property/Sbuild.hs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Propellor/Property/Ccache.hs b/src/Propellor/Property/Ccache.hs index d9b2e458..45208508 100644 --- a/src/Propellor/Property/Ccache.hs +++ b/src/Propellor/Property/Ccache.hs @@ -10,7 +10,7 @@ import Utility.FileMode import System.Posix.Files -- | Limits on the size of a ccache -data CcacheLimit +data Limit -- | The maximum size of the cache, as a string such as "4G" -- -- See ccache(1) for more on the size specification. @@ -33,7 +33,7 @@ data CcacheLimit -- wish to limit both the maximum size of the cache and the maximum number of -- files in the cache. However, setting only one of these two limits is -- generally sufficient. -hasGroupCache :: Group -> CcacheLimit -> RevertableProperty DebianLike UnixLike +hasGroupCache :: Group -> Limit -> RevertableProperty DebianLike UnixLike group@(Group g) `hasGroupCache` limit = (make `requires` installed) delete where make = propertyList ("ccache for " ++ g ++ " exists") $ props diff --git a/src/Propellor/Property/Sbuild.hs b/src/Propellor/Property/Sbuild.hs index 996b5619..ecf33712 100644 --- a/src/Propellor/Property/Sbuild.hs +++ b/src/Propellor/Property/Sbuild.hs @@ -240,7 +240,7 @@ 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.hasGroupCache` "2G" + & Group "sbuild" `Ccache.hasGroupCache` (Ccache.MaxSize "2G") & "/etc/schroot/sbuild/fstab" `File.containsLine` "/var/cache/ccache-sbuild /var/cache/ccache-sbuild none rw,bind 0 0" & "/var/cache/ccache-sbuild/sbuild-setup" `File.hasContent` -- cgit v1.2.3