From 10cb6c5c4e69d5d7617bedf2b439e371e4ff07ab Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 2 Feb 2017 20:56:29 -0700 Subject: AptPrefPackage type --- src/Propellor/Property/Apt.hs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index ef3387ca..e426b26f 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -249,6 +249,11 @@ buildDepIn dir = cmdPropertyEnv "sh" ["-c", cmd] noninteractiveEnv where cmd = "cd '" ++ dir ++ "' && mk-build-deps debian/control --install --tool 'apt-get -y --no-install-recommends' --remove" +-- | The name of a package, a glob to match the names of packages, or a regexp +-- surrounded by slashes to match the names of packages. See +-- apt_preferences(5), "Regular expressions and glob(7) syntax" +type AptPrefPackage = String + -- | Pins a list of packages, package wildcards and/or regular expressions to a -- given suite with a given pin priority (see apt_preferences(5)). Revert to -- unpin. @@ -261,14 +266,14 @@ buildDepIn dir = cmdPropertyEnv "sh" ["-c", cmd] noninteractiveEnv -- > & Apt.suiteAvailablePinned Unstable (-10) -- > & ["elpa-*"] `Apt.pinnedTo` (Unstable, 990) pinnedTo - :: [String] + :: [AptPrefPackage] -> (DebianSuite, PinPriority) -> RevertableProperty UnixLike UnixLike pinnedTo ps (suite, pin) = (\p -> pinnedTo' p (suite, pin)) `applyToList` ps `describe` unwords (("pinned to " ++ showSuite suite):ps) pinnedTo' - :: String + :: AptPrefPackage -> (DebianSuite, PinPriority) -> RevertableProperty UnixLike UnixLike pinnedTo' p (suite, pin) = -- cgit v1.2.3