summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Apt.hs
diff options
context:
space:
mode:
authorSean Whitton2017-01-31 20:27:23 -0700
committerSean Whitton2017-01-31 20:27:23 -0700
commit2220efc954a49a156942b3566350980ed483a64f (patch)
tree21088b9c15298cf8d3d2ddc5158eff007af87eeb /src/Propellor/Property/Apt.hs
parentf5d5a99e23e59dd010f8a1778dab75fa318a95c3 (diff)
pass a tuple to Apt.pinnedTo
This permits calling Apt.pinnedTo infix
Diffstat (limited to 'src/Propellor/Property/Apt.hs')
-rw-r--r--src/Propellor/Property/Apt.hs14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs
index d1958412..314cfef1 100644
--- a/src/Propellor/Property/Apt.hs
+++ b/src/Propellor/Property/Apt.hs
@@ -258,21 +258,19 @@ buildDepIn dir = cmdPropertyEnv "sh" ["-c", cmd] noninteractiveEnv
--
-- For example, to obtain all Emacs Lisp addon packages from sid, you could use
--
--- > & Apt.suiteAvailablePinned Unstable
--- > & ["elpa-*"] `Apt.pinnedTo` Unstable 990
+-- > & Apt.suiteAvailablePinned Unstable (-10)
+-- > & ["elpa-*"] `Apt.pinnedTo` (Unstable, 990)
pinnedTo
:: [String]
- -> DebianSuite
- -> PinPriority
+ -> (DebianSuite, PinPriority)
-> RevertableProperty UnixLike UnixLike
-pinnedTo ps suite pin = (\p -> pinnedTo' p suite pin) `applyToList` ps
+pinnedTo ps (suite, pin) = (\p -> pinnedTo' p (suite, pin)) `applyToList` ps
pinnedTo'
:: String
- -> DebianSuite
- -> PinPriority
+ -> (DebianSuite, PinPriority)
-> RevertableProperty UnixLike UnixLike
-pinnedTo' p suite pin =
+pinnedTo' p (suite, pin) =
"/etc/apt/preferences.d/10propellor" `File.containsBlock`
[ "Package: " ++ p
, "Pin: release " ++ suitePin suite