diff options
| author | Joey Hess <joey@kitenet.net> | 2014-04-17 23:32:42 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-04-17 23:32:42 -0400 |
| commit | cc169f4ac0cf8ac6de38662671c14abd419b5f48 (patch) | |
| tree | 257b417446ad9e639030da07d14fe87912f3803a /Propellor/Property/Obnam.hs | |
| parent | fd0cfda04c7b0cbd0fdb868ef92e1923481a856c (diff) | |
propellor spin
Diffstat (limited to 'Propellor/Property/Obnam.hs')
| -rw-r--r-- | Propellor/Property/Obnam.hs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Propellor/Property/Obnam.hs b/Propellor/Property/Obnam.hs index 4d0584bb..6fda218a 100644 --- a/Propellor/Property/Obnam.hs +++ b/Propellor/Property/Obnam.hs @@ -97,14 +97,17 @@ installed = Apt.installed ["obnam"] -- | Ensures that a recent version of obnam gets installed. -- --- Only useful on Stable. +-- Only does anything for Debian Stable. latestVersion :: Property -latestVersion = propertyList "obnam latest version" - [ toProp $ Apt.trustsKey key - , Apt.setSourcesListD sources "obnam" - ] +latestVersion = withOS "obnam latest version" $ \o -> case o of + (Just (System (Debian suite) _)) | isStable suite -> ensureProperty $ + Apt.setSourcesListD (sources suite) "obnam" + `requires` toProp (Apt.trustsKey key) + _ -> noChange where - sources = ["deb http://code.liw.fi/debian wheezy main"] + sources suite = + [ "deb http://code.liw.fi/debian " ++ Apt.showSuite suite ++ " main" + ] -- gpg key used by the code.liw.fi repository. key = Apt.AptKey "obnam" $ unlines [ "-----BEGIN PGP PUBLIC KEY BLOCK-----" |
