From 4ac314fb4812ccdb62e930fe53e312ced6171e12 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 5 Jun 2014 17:01:32 -0400 Subject: Apt.stdSourcesList no longer needs a suite to be specified. --- src/Propellor/Property/Apt.hs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/Propellor/Property/Apt.hs') 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. -- -- cgit v1.3-2-g0d8e