diff options
| author | Joey Hess <joey@kitenet.net> | 2014-06-05 17:01:32 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-06-05 17:01:32 -0400 |
| commit | 4ac314fb4812ccdb62e930fe53e312ced6171e12 (patch) | |
| tree | 110f785501a6bc7638edebfc12a7f6d3d7bea472 /src/Propellor/Property/Apt.hs | |
| parent | e1d7441e32818e06269353fa0044851ae09e1bdd (diff) | |
Apt.stdSourcesList no longer needs a suite to be specified.
Diffstat (limited to 'src/Propellor/Property/Apt.hs')
| -rw-r--r-- | src/Propellor/Property/Apt.hs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index 69144d72..17057af2 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -64,12 +64,19 @@ securityUpdates suite | otherwise = [] -- | Makes sources.list have a standard content using the mirror CDN, --- with a particular DebianSuite. +-- with the Debian suite configured by the os. -- -- Since the CDN is sometimes unreliable, also adds backup lines using -- kernel.org. -stdSourcesList :: DebianSuite -> Property -stdSourcesList suite = stdSourcesList' suite [] +stdSourcesList :: Property +stdSourcesList = withOS ("standard sources.list") $ \o -> + case o of + (Just (System (Debian suite) _)) -> + ensureProperty $ stdSourcesListFor suite + _ -> error "os is not declared to be Debian" + +stdSourcesListFor :: DebianSuite -> Property +stdSourcesListFor suite = stdSourcesList' suite [] -- | Adds additional sources.list generators. -- |
