summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess2014-04-02 00:05:10 -0400
committerJoey Hess2014-04-02 00:05:10 -0400
commit3f96e5a5f3f278249698279888e6bf2c23fd0aed (patch)
tree998f7beb70a26c1cc9ec9c3b59c66d80f3c6dc98
parent29bd0c3689e030d5cf2b2c58f60bc6642a4ee104 (diff)
propellor spin
-rw-r--r--Propellor/Property/Apt.hs18
1 files changed, 14 insertions, 4 deletions
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)