diff options
| author | Joey Hess <joeyh@joeyh.name> | 2016-03-25 15:32:16 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2016-03-25 15:32:16 -0400 |
| commit | e28f49b7d1ae361e42809977bf12d3f126c3d90d (patch) | |
| tree | 7408519abbd0ab209063d42d9a0717d92a3f7dc1 /src | |
| parent | 1edce2b72614e2e8eceefde97436db024799ff20 (diff) | |
much simpler and more type safe implementation of Apt.robustly, using fallback!
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/Apt.hs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index 3dd7277e..9c3b05c4 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -75,7 +75,7 @@ securityUpdates suite in [l, srcLine l] | otherwise = [] --- | Makes sources.list have a standard content using the mirror CDN, +-- | Makes sources.list have a standard content using the Debian mirror CDN, -- with the Debian suite configured by the os. -- -- Since the CDN is sometimes unreliable, also adds backup lines using @@ -196,13 +196,7 @@ buildDepIn dir = cmdPropertyEnv "sh" ["-c", cmd] noninteractiveEnv -- | Package installation may fail becuse the archive has changed. -- Run an update in that case and retry. robustly :: Property DebianLike -> Property DebianLike -robustly p = adjustPropertySatisfy p $ \satisfy -> do - r <- satisfy - if r == FailedChange - -- Safe to use getSatisfy because we're re-running - -- the same property as before. - then getSatisfy $ p `requires` update - else return r +robustly p = p `fallback` (update `before` p) isInstallable :: [Package] -> IO Bool isInstallable ps = do |
