simplify using makeChange

This commit is contained in:
Joey Hess 2014-12-07 14:49:12 -04:00
parent 6a906c8a4c
commit 8c12047b6b
2 changed files with 3 additions and 5 deletions

View File

@ -93,9 +93,8 @@ built' installprop target system@(System _ arch) config =
, return FailedChange
)
teardownprop = property ("removed debootstrapped " ++ target) $ liftIO $ do
removetarget
return MadeChange
teardownprop = property ("removed debootstrapped " ++ target) $
makeChange removetarget
removetarget = do
submnts <- filter (\p -> simplifyPath p /= simplifyPath target)

View File

@ -151,9 +151,8 @@ nspawnService (Container name _ _) cfg = RevertableProperty setup teardown
<$> servicefilecontent
<*> catchDefaultIO "" (readFile servicefile)
writeservicefile = property servicefile $ liftIO $ do
writeservicefile = property servicefile $ makeChange $
viaTmp writeFile servicefile =<< servicefilecontent
return MadeChange
setupservicefile = check (not <$> goodservicefile) $
-- if it's running, it has the wrong configuration,