From 3f96e5a5f3f278249698279888e6bf2c23fd0aed Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 2 Apr 2014 00:05:10 -0400 Subject: propellor spin --- Propellor/Property/Apt.hs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'Propellor/Property') diff --git a/Propellor/Property/Apt.hs b/Propellor/Property/Apt.hs index 9f2365e0..360f27d4 100644 --- a/Propellor/Property/Apt.hs +++ b/Propellor/Property/Apt.hs @@ -35,13 +35,23 @@ srcLine l = case words l of stdSections :: [Section] stdSections = ["main", "contrib", "non-free"] -debCdn :: DebianSuite -> [Line] -debCdn suite = [l, srcLine l] +binandsrc :: String -> DebianSuite -> [Line] +binandsrc url suite = [l, srcLine l] where - l = debLine suite "http://cdn.debian.net/debian" stdSections + l = debLine suite url stdSections + +debCdn :: DebianSuite -> [Line] +debCdn = binandsrc "http://cdn.debian.net/debian" + +kernelOrg :: DebianSuite -> [Line] +kernelOrg = binandsrc "http://mirrors.kernel.org/debian" {- | Makes sources.list have a standard content using the mirror CDN, - - with a particular DebianSuite. -} + - with a particular DebianSuite. + - + - Since the CDN is sometimes unreliable, also adds backup lines using + - kernel.org. + -} stdSourcesList :: DebianSuite -> Property stdSourcesList suite = setSourcesList (debCdn suite) `describe` ("standard sources.list for " ++ show suite) -- cgit v1.2.3