summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Propellor/Property/Apt.hs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs
index 279a5da8..196fb345 100644
--- a/src/Propellor/Property/Apt.hs
+++ b/src/Propellor/Property/Apt.hs
@@ -154,7 +154,7 @@ installed :: [Package] -> Property DebianLike
installed = installed' ["-y"]
installed' :: [String] -> [Package] -> Property DebianLike
-installed' params ps = robustly $ check (isInstallable ps) go
+installed' params ps = robustly $ check (not <$> isInstalled' ps) go
`describe` unwords ("apt installed":ps)
where
go = runApt (params ++ ["install"] ++ ps)
@@ -201,9 +201,6 @@ buildDepIn dir = cmdPropertyEnv "sh" ["-c", cmd] noninteractiveEnv
robustly :: Property DebianLike -> Property DebianLike
robustly p = p `fallback` (update `before` p)
-isInstallable :: [Package] -> IO Bool
-isInstallable ps = any (== NotInstalled) <$> getInstallStatus ps
-
isInstalled :: Package -> IO Bool
isInstalled p = isInstalled' [p]