diff options
| author | Joey Hess <joey@kitenet.net> | 2014-04-18 03:59:06 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-04-18 03:59:06 -0400 |
| commit | 4e4fb9ab7ca13f5148c6d4b08f53f518429530a8 (patch) | |
| tree | e44754f3e3a49d811d3387495ca24a475bd00162 /Propellor/Property/Apt.hs | |
| parent | 66921ff667705e427c1000b7ae071f03fc0eb567 (diff) | |
get rid of AttrProperty
Now both Property and RevertableProperty can influence Attr on their own.
Diffstat (limited to 'Propellor/Property/Apt.hs')
| -rw-r--r-- | Propellor/Property/Apt.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Propellor/Property/Apt.hs b/Propellor/Property/Apt.hs index d31e8b46..2115dc50 100644 --- a/Propellor/Property/Apt.hs +++ b/Propellor/Property/Apt.hs @@ -157,7 +157,7 @@ buildDepIn dir = go `requires` installedMin ["devscripts", "equivs"] -- | Package installation may fail becuse the archive has changed. -- Run an update in that case and retry. robustly :: Property -> Property -robustly p = Property (propertyDesc p) $ do +robustly p = property (propertyDesc p) $ do r <- ensureProperty p if r == FailedChange then ensureProperty $ p `requires` update @@ -210,7 +210,7 @@ reConfigure :: Package -> [(String, String, String)] -> Property reConfigure package vals = reconfigure `requires` setselections `describe` ("reconfigure " ++ package) where - setselections = Property "preseed" $ makeChange $ + setselections = property "preseed" $ makeChange $ withHandle StdinHandle createProcessSuccess (proc "debconf-set-selections" []) $ \h -> do forM_ vals $ \(tmpl, tmpltype, value) -> @@ -236,7 +236,7 @@ trustsKey k = RevertableProperty trust untrust desc = "apt trusts key " ++ keyname k f = "/etc/apt/trusted.gpg.d" </> keyname k ++ ".gpg" untrust = File.notPresent f - trust = check (not <$> doesFileExist f) $ Property desc $ makeChange $ do + trust = check (not <$> doesFileExist f) $ property desc $ makeChange $ do withHandle StdinHandle createProcessSuccess (proc "gpg" ["--no-default-keyring", "--keyring", f, "--import", "-"]) $ \h -> do hPutStr h (pubkey k) |
