diff options
| author | Joey Hess <joey@kitenet.net> | 2014-04-17 22:25:09 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-04-17 22:25:09 -0400 |
| commit | 69eb566e0bd7d961e1227d10200b22fd1f0276eb (patch) | |
| tree | 22e9f5c9fef4575851e24582c8f17d2572288568 /Propellor/Property/Apt.hs | |
| parent | 0e0a70f794c8659a1687278a69f6ee87eebf4798 (diff) | |
propellor spin
Diffstat (limited to 'Propellor/Property/Apt.hs')
| -rw-r--r-- | Propellor/Property/Apt.hs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Propellor/Property/Apt.hs b/Propellor/Property/Apt.hs index fe9b8e26..465714fc 100644 --- a/Propellor/Property/Apt.hs +++ b/Propellor/Property/Apt.hs @@ -71,6 +71,10 @@ securityUpdates suite stdSourcesList :: DebianSuite -> Property stdSourcesList suite = stdSourcesList' suite [] +-- | Adds additional sources.list generators. +-- +-- Note that if a Property needs to enable an apt source, it's better +-- to do so via a separate file in /etc/apt/sources.list.d/ stdSourcesList' :: DebianSuite -> [SourcesGenerator] -> Property stdSourcesList' suite more = setSourcesList (concatMap (\gen -> gen suite) generators) @@ -81,6 +85,11 @@ stdSourcesList' suite more = setSourcesList setSourcesList :: [Line] -> Property setSourcesList ls = sourcesList `File.hasContent` ls `onChange` update +setSourcesListD :: [Line] -> FilePath -> Property +setSourcesListD ls basename = f `File.hasContent` ls `onChange` update + where + f = "/etc/apt/sources.list.d/" ++ basename + runApt :: [String] -> Property runApt ps = cmdProperty' "apt-get" ps noninteractiveEnv |
