summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton2016-05-21 20:09:31 +0900
committerSean Whitton2016-05-21 20:09:31 +0900
commit4a53b158a2b6ca5e64f45058b2e26fe0a0c579e9 (patch)
treee989ae54936c1b281465594fd887aefcb94e9180
parent10f3c2db21a4b5c53d2575977cc1228fb71c9bc8 (diff)
update Sbuild.hs for new Ccache.hs
-rw-r--r--src/Propellor/Property/Ccache.hs4
-rw-r--r--src/Propellor/Property/Sbuild.hs2
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`