diff options
| author | Sean Whitton <spwhitton@spwhitton.name> | 2017-01-30 19:27:05 -0700 |
|---|---|---|
| committer | Sean Whitton <spwhitton@spwhitton.name> | 2017-01-30 19:27:05 -0700 |
| commit | ec22249085439af2f4dbcceafffd95afb17c57d1 (patch) | |
| tree | b01703b68bbd6691b985397cc0242b813af5ed98 | |
| parent | c64b712867e5c30b635184a351164ecb139249c4 (diff) | |
commented hacking
| -rw-r--r-- | src/Propellor/Property/Apt.hs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index 061bef83..1de84b87 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -258,6 +258,29 @@ buildDepIn dir = cmdPropertyEnv "sh" ["-c", cmd] noninteractiveEnv pinnedTo :: [String] -> DebianSuite -> PinPriority -> RevertableProperty Debian Debian pinnedTo = undefined +-- ps `pinnedTo` suite pin = (f `File.containsLines` ls) <!> (f `File.lacksLines` ls) +-- `describe` unwords (ps ++ ["pinned to " ++ showSuite suite]) +-- where +-- ls = [ "Package: " ++ unwords ps +-- , "Pin: release " ++ suitePin suite +-- , "Pin-Priority: " ++ show pin +-- ] +-- f = "/etc/apt/preferences.d/10propellor" + +-- -- Apt supports multiple entries in each "Package:" line, so we could use a +-- -- single configuration block for each pinnedTo property that is applied to the +-- -- host. However, that would make it hard to sensibly revert the pin. + +-- pinnedTo' :: String -> DebianSuite -> PinPriority -> RevertableProperty Debian +-- p `pinnedTo` suite pin = (f `File.containsLines` ls) <!> (f `File.lacksLines` ls) +-- where +-- ls = [ "" +-- , "Package: " ++ p +-- , "Pin: release " ++ suitePin suite +-- , "Pin-Priority: " ++ show pin +-- ] +-- f = "/etc/apt/preferences.d/10" ++ p + -- | Package installation may fail becuse the archive has changed. -- Run an update in that case and retry. robustly :: Property DebianLike -> Property DebianLike |
