From bd8396406c4f86fba598fb98e097d657e72f2ab0 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 2 Feb 2017 20:51:51 -0700 Subject: Apt.pinnedTo uses File.configFileName --- src/Propellor/Property/Apt.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index 8539c4a6..ef3387ca 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -272,12 +272,16 @@ pinnedTo' -> (DebianSuite, PinPriority) -> RevertableProperty UnixLike UnixLike pinnedTo' p (suite, pin) = - "/etc/apt/preferences.d/10propellor.pref" `File.containsBlock` + (prefFile `File.hasContent` prefs) File.notPresent prefFile + where + prefs = [ "Package: " ++ p , "Pin: release " ++ suitePin suite , "Pin-Priority: " ++ show pin , "" ] + prefFile = "/etc/apt/preferences.d/10propellor_" + ++ File.configFileName p <.> "pref" -- TODO should be RevertableProperty Debian Debian -- cgit v1.2.3