summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Sbuild.hs
diff options
context:
space:
mode:
authorSean Whitton2016-05-17 12:07:39 -0700
committerSean Whitton2016-05-17 12:07:39 -0700
commit80ef1acd5e86e91c47b90345e24fa4a9701cf8a9 (patch)
tree1828dc0e9eed6bb39b8a9486eb0117d4b3f43121 /src/Propellor/Property/Sbuild.hs
parent8d43f56a42239468960623a5f12d770d3ae872ad (diff)
property descs & rewrite updated
Diffstat (limited to 'src/Propellor/Property/Sbuild.hs')
-rw-r--r--src/Propellor/Property/Sbuild.hs25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/Propellor/Property/Sbuild.hs b/src/Propellor/Property/Sbuild.hs
index 6b023460..5f182881 100644
--- a/src/Propellor/Property/Sbuild.hs
+++ b/src/Propellor/Property/Sbuild.hs
@@ -79,7 +79,8 @@ builtFor system = case schrootFromSystem system of
-- | Build and configure a schroot for use with sbuild
built :: SbuildSchroot -> Apt.Url -> Property DebianLike
-built s mirror = check (not <$> doesDirectoryExist (schrootRoot s)) go
+built s mirror = check (not <$> doesDirectoryExist (schrootRoot s)) $
+ property ("built schroot for " ++ show s) go
`requires` keypairGenerated
`requires` installed
@@ -94,15 +95,16 @@ updatedFor system = case schrootFromSystem system of
-- | Ensure that an sbuild schroot's packages and apt indexes are updated
updated :: SbuildSchroot -> Property DebianLike
-updated s = check (doesDirectoryExist (schrootRoot s)) go
+updated s@(SbuildSchroot suite arch) =
+ check (doesDirectoryExist (schrootRoot s)) $
+ property ("updated schroot for " ++ show s) go
`requires` keypairGenerated
`requires` installed
+ where
+ go :: Property DebianLike
+ go = tightenTargets $ cmdProperty
+ "sbuild-update" ["-udr", suite ++ "-" ++ arch]
--- built' :: System -> Property DebianLike
--- built' system@(System distro arch) =
--- property' ("built chroot for " ++ show system) (liftIO go)
--- `requires` keypairGenerated
--- where
-- go = do
-- suite <- case extractSuite system of
-- Just s -> return s
@@ -145,15 +147,6 @@ fixConfFile s@(SbuildSchroot suite arch) = do
tempPrefix = dir </> suite ++ "-" ++ arch ++ "-propellor-"
munge = replace "-propellor]" "-sbuild]"
--- -- | Update a schroot's installed packages and apt indexes.
--- updated :: System -> Property DebianLike
--- updated system@(System distro arch) = go `requires` installed
--- where
--- go :: Property DebianLike
--- go = tightenTargets $ cmdProperty
--- "sbuild-update" ["-udr", suite ++ "-" ++ arch]
--- suite = fromJust $ extractSuite system
-
-- | Bind-mount @/var/cache/apt/archives@ in all sbuild chroots so that the host
-- system and the chroot share the apt cache
--