diff options
| author | Sean Whitton <spwhitton@spwhitton.name> | 2016-05-20 07:54:49 +0900 |
|---|---|---|
| committer | Sean Whitton <spwhitton@spwhitton.name> | 2016-05-20 07:54:49 +0900 |
| commit | fb527146c7f48231dc6d430179d06d4b9ffa96fe (patch) | |
| tree | 59b1ded8332eb2e8cde5a86a0e90ece0bbcc2751 /src | |
| parent | 6eb8e9fedfa4a1b12f1f2a48791f10132b76d012 (diff) | |
fix warnings about throwing away do results
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/Sbuild.hs | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/src/Propellor/Property/Sbuild.hs b/src/Propellor/Property/Sbuild.hs index 72f224f0..bd3c9056 100644 --- a/src/Propellor/Property/Sbuild.hs +++ b/src/Propellor/Property/Sbuild.hs @@ -104,8 +104,8 @@ builtFor system = go <!> deleted built :: SbuildSchroot -> Apt.Url -> RevertableProperty DebianLike UnixLike built s@(SbuildSchroot suite arch) mirror = (go - `requires` keypairGenerated - `requires` ccachePrepared + `requires` keypairGenerated + `requires` ccachePrepared `requires` installed) <!> deleted where @@ -122,24 +122,24 @@ built s@(SbuildSchroot suite arch) mirror = , mirror ] ifM (liftIO $ boolSystemEnv "sbuild-createchroot" params (Just de)) - ( do - ensureProperty w $ fixConfFile s - -- if we just built a sid chroot, add useful aliases - if suite == "unstable" - then ensureProperty w aliasesLine - else noChange - -- enable ccache and eatmydata for speed - ensureProperty w commandPrefix - return MadeChange + ( ensureProperty w $ + fixConfFile s + `before` aliasesLine + `before` commandPrefix , return FailedChange ) deleted = check (doesDirectoryExist (schrootRoot s)) $ - property' ("no sbuild schroot for " ++ show s) $ \w -> do - ensureProperty w $ File.notPresent (schrootConf s) - makeChange (removeChroot $ schrootRoot s) + property ("no sbuild schroot for " ++ show s) $ do + liftIO $ removeChroot $ schrootRoot s + makeChange $ nukeFile (schrootConf s) - aliasesLine = File.containsLine (schrootConf s) - "aliases=UNRELEASED,sid,rc-buggy,experimental" + -- if we're building a sid chroot, add useful aliases + aliasesLine :: Property UnixLike + aliasesLine = if suite == "unstable" + then File.containsLine (schrootConf s) + "aliases=UNRELEASED,sid,rc-buggy,experimental" + else doNothing + -- enable ccache and eatmydata for speed commandPrefix = File.containsLine (schrootConf s) "command-prefix=/var/cache/ccache-sbuild/sbuild-setup,eatmydata" @@ -181,10 +181,9 @@ fixConfFile s@(SbuildSchroot suite arch) = property' ("schroot for " ++ show s ++ " config file fixed") $ \w -> do confs <- liftIO $ dirContents dir let old = concat $ filter (tempPrefix `isPrefixOf`) confs - ensureProperty w $ - File.fileProperty "replace dummy suffix" (map munge) old liftIO $ moveFile old new - return MadeChange + ensureProperty w $ + File.fileProperty "replace dummy suffix" (map munge) new where new = schrootConf s dir = takeDirectory new |
