From 595794a250a35f3f3613dcf47b955bcdae867e04 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 2 Apr 2014 20:44:11 -0400 Subject: propellor spin --- Propellor/Property/Apt.hs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Propellor/Property') diff --git a/Propellor/Property/Apt.hs b/Propellor/Property/Apt.hs index 2d7c927c..6f2f95d7 100644 --- a/Propellor/Property/Apt.hs +++ b/Propellor/Property/Apt.hs @@ -79,14 +79,17 @@ upgrade = runApt ["-y", "dist-upgrade"] type Package = String installed :: [Package] -> Property -installed ps = robustly $ check (isInstallable ps) go +installed = installed' ["-y"] + +installed' :: [String] -> [Package] -> Property +installed' params ps = robustly $ check (isInstallable ps) go `describe` (unwords $ "apt installed":ps) where - go = runApt $ ["-y", "install"] ++ ps + go = runApt $ params ++ ["install"] ++ ps -- | Minimal install of package, without recommends. installedMin :: [Package] -> Property -installedMin ps = installed ("--no-install-recommends" : ps) +installedMin = installed' ["--no-install-recommends"] removed :: [Package] -> Property removed ps = check (or <$> isInstalled' ps) go -- cgit v1.2.3