summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Propellor/Property/Apt.hs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs
index d05bdcb9..eae56ab5 100644
--- a/src/Propellor/Property/Apt.hs
+++ b/src/Propellor/Property/Apt.hs
@@ -135,7 +135,7 @@ upgrade' p = combineProperties ("apt " ++ p)
`assume` MadeChange
]
--- | Have apt upgrade packages, but never add new packages or remove
+-- | Have apt upgrade packages, but never add new packages or remove
-- old packages. Not suitable for upgrading acrocess major versions
-- of the distribution.
safeUpgrade :: Property NoInfo
@@ -143,7 +143,7 @@ safeUpgrade = upgrade' "upgrade"
-- | Have dpkg try to configure any packages that are not fully configured.
pendingConfigured :: Property NoInfo
-pendingConfigured = cmdProperty "dpkg" ["--confugure", "--pending"]
+pendingConfigured = cmdPropertyEnv "dpkg" ["--configure", "--pending"] noninteractiveEnv
`assume` MadeChange
`describe` "dpkg configured pending"
@@ -154,7 +154,7 @@ installed = installed' ["-y"]
installed' :: [String] -> [Package] -> Property NoInfo
installed' params ps = robustly $ check (isInstallable ps) go
- `describe` (unwords $ "apt installed":ps)
+ `describe` unwords ("apt installed":ps)
where
go = runApt (params ++ ["install"] ++ ps)
@@ -163,12 +163,12 @@ installedBackport ps = withOS desc $ \o -> case o of
Nothing -> error "cannot install backports; os not declared"
(Just (System (Debian suite) _)) -> case backportSuite suite of
Nothing -> notsupported o
- Just bs -> ensureProperty $
+ Just bs -> ensureProperty $
runApt (["install", "-t", bs, "-y"] ++ ps)
`changesFile` dpkgStatus
_ -> notsupported o
where
- desc = (unwords $ "apt installed backport":ps)
+ desc = unwords ("apt installed backport":ps)
notsupported o = error $ "backports not supported on " ++ show o
-- | Minimal install of package, without recommends.
@@ -177,12 +177,12 @@ installedMin = installed' ["--no-install-recommends", "-y"]
removed :: [Package] -> Property NoInfo
removed ps = check (or <$> isInstalled' ps) (runApt (["-y", "remove"] ++ ps))
- `describe` (unwords $ "apt removed":ps)
+ `describe` unwords ("apt removed":ps)
buildDep :: [Package] -> Property NoInfo
buildDep ps = robustly $ go
`changesFile` dpkgStatus
- `describe` (unwords $ "apt build-dep":ps)
+ `describe` unwords ("apt build-dep":ps)
where
go = runApt $ ["-y", "build-dep"] ++ ps
@@ -275,8 +275,8 @@ reConfigure :: Package -> [(DebconfTemplate, DebconfTemplateType, DebconfTemplat
reConfigure package vals = reconfigure `requires` setselections
`describe` ("reconfigure " ++ package)
where
- setselections = property "preseed" $
- if null vals
+ setselections = property "preseed" $
+ if null vals
then noChange
else makeChange $
withHandle StdinHandle createProcessSuccess
@@ -331,7 +331,7 @@ hasForeignArch :: String -> Property NoInfo
hasForeignArch arch = check notAdded (add `before` update)
`describe` ("dpkg has foreign architecture " ++ arch)
where
- notAdded = (not . elem arch . lines) <$> readProcess "dpkg" ["--print-foreign-architectures"]
+ notAdded = (notElem arch . lines) <$> readProcess "dpkg" ["--print-foreign-architectures"]
add = cmdProperty "dpkg" ["--add-architecture", arch]
`assume` MadeChange