diff options
| author | Sean Whitton <spwhitton@spwhitton.name> | 2016-05-20 07:11:28 +0900 |
|---|---|---|
| committer | Sean Whitton <spwhitton@spwhitton.name> | 2016-05-20 07:11:28 +0900 |
| commit | b97bc4aa6d679cba670c1445eb5696e3d261a7c1 (patch) | |
| tree | a61c32c805daf9ebcccf50de5883474a3ce492e6 /src | |
| parent | af45dd5862285da8b85b8ea8cef95391d1b2567a (diff) | |
use removeChroot to delete schroots
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/Sbuild.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Propellor/Property/Sbuild.hs b/src/Propellor/Property/Sbuild.hs index 7bf13a64..e0d8abea 100644 --- a/src/Propellor/Property/Sbuild.hs +++ b/src/Propellor/Property/Sbuild.hs @@ -95,7 +95,7 @@ builtFor system = go <!> deleted deleted = property' ("no sbuild schroot for " ++ show system) $ \w -> case schrootFromSystem system of Just s -> ensureProperty w $ undoRevertableProperty $ built s "dummy" - Nothing -> return NoChange + Nothing -> noChange -- | Build and configure a schroot for use with sbuild built :: SbuildSchroot -> Apt.Url -> RevertableProperty DebianLike UnixLike @@ -130,8 +130,9 @@ built s@(SbuildSchroot suite arch) mirror = built <!> deleted , return FailedChange ) deleted = check (doesDirectoryExist (schrootRoot s)) $ - cmdProperty "rm" ["-r", schrootRoot s] `assume` MadeChange - `describe` ("sbuild schroot for " ++ show s ++ " does not exist") + property' ("no sbuild schroot for " ++ show s) $ \w -> do + ensureProperty w $ File.notPresent (schrootConf s) + makeChange (removeChroot $ schrootRoot s) -- | Ensure that an sbuild schroot's packages and apt indexes are updated -- |
