summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton2017-02-02 20:51:51 -0700
committerSean Whitton2017-02-02 20:52:52 -0700
commitbd8396406c4f86fba598fb98e097d657e72f2ab0 (patch)
treec3933cf1a5aa64c439d55125e3b0c727591cf3b9
parent967b58752ce1b932882b61ca138c29cf82cc377c (diff)
Apt.pinnedTo uses File.configFileName
-rw-r--r--src/Propellor/Property/Apt.hs6
1 files changed, 5 insertions, 1 deletions
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