diff options
| author | Sean Whitton <spwhitton@spwhitton.name> | 2017-02-02 20:51:51 -0700 |
|---|---|---|
| committer | Sean Whitton <spwhitton@spwhitton.name> | 2017-02-02 20:52:52 -0700 |
| commit | bd8396406c4f86fba598fb98e097d657e72f2ab0 (patch) | |
| tree | c3933cf1a5aa64c439d55125e3b0c727591cf3b9 /src/Propellor/Property/Apt.hs | |
| parent | 967b58752ce1b932882b61ca138c29cf82cc377c (diff) | |
Apt.pinnedTo uses File.configFileName
Diffstat (limited to 'src/Propellor/Property/Apt.hs')
| -rw-r--r-- | src/Propellor/Property/Apt.hs | 6 |
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 |
