diff options
| author | Sean Whitton <spwhitton@spwhitton.name> | 2016-05-17 11:48:22 -0700 |
|---|---|---|
| committer | Sean Whitton <spwhitton@spwhitton.name> | 2016-05-17 11:48:22 -0700 |
| commit | 7d39a7da893934348cad9462507c20f450ce0952 (patch) | |
| tree | 475a5506d47c29ef9e8cb6fead2d27d3d4c895e5 /src | |
| parent | 03a0ca368e5aafd33b9ab6f04c465079462aeaf6 (diff) | |
tidy up wrapper fns
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/Sbuild.hs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Propellor/Property/Sbuild.hs b/src/Propellor/Property/Sbuild.hs index 0dcf1bc6..8cb85bf3 100644 --- a/src/Propellor/Property/Sbuild.hs +++ b/src/Propellor/Property/Sbuild.hs @@ -73,12 +73,14 @@ data SbuildSchroot = SbuildSchroot Suite Architecture -- user to identify the schroot and distribution using the 'System' type builtFor :: System -> Property DebianLike builtFor system = case schrootFromSystem system of - Just s -> check (not <$> doesDirectoryExist (schrootRoot s)) $ - built s (stdMirror system) + Just s -> built s (stdMirror system) Nothing -> errorMessage "don't know how to debootstrap " ++ show system -- | Build and configure a schroot for use with sbuild built :: SbuildSchroot -> Apt.Url -> Property DebianLike +built s mirror = check (not <$> doesDirectoryExist (schrootRoot s)) go + `requires` keypairGenerated + `requires` installed -- | Ensure that an sbuild schroot's packages and apt indexes are updated -- @@ -86,11 +88,14 @@ built :: SbuildSchroot -> Apt.Url -> Property DebianLike -- user to identify the schroot using the 'System' type updatedFor :: System -> Property DebianLike updatedFor system = case schrootFromSystem system of - Just s -> updated s (stdMirror system) + Just s -> updated s Nothing -> errorMessage "don't know how to debootstrap " ++ show system -- | Ensure that an sbuild schroot's packages and apt indexes are updated updated :: SbuildSchroot -> Property DebianLike +updated s = check (doesDirectoryExist (schrootRoot s)) go + `requires` keypairGenerated + `requires` installed -- built' :: System -> Property DebianLike -- built' system@(System distro arch) = |
