From ec22249085439af2f4dbcceafffd95afb17c57d1 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 30 Jan 2017 19:27:05 -0700 Subject: commented hacking --- src/Propellor/Property/Apt.hs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/Propellor/Property/Apt.hs') 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 -- cgit v1.2.3