Drop support for building with old versions of dns and http-conduit.
This commit is contained in:
parent
fc3925a1cd
commit
ca49a84ba5
4 changed files with 4 additions and 18 deletions
|
@ -14,6 +14,7 @@ git-annex (6.20170301.2) UNRELEASED; urgency=medium
|
||||||
* Windows: Improve handling of shebang in external special remote
|
* Windows: Improve handling of shebang in external special remote
|
||||||
program, searching for the program in the PATH.
|
program, searching for the program in the PATH.
|
||||||
* Drop support for building without network-uri.
|
* Drop support for building without network-uri.
|
||||||
|
* Drop support for building with old versions of dns and http-conduit.
|
||||||
|
|
||||||
-- Joey Hess <id@joeyh.name> Thu, 02 Mar 2017 12:51:40 -0400
|
-- Joey Hess <id@joeyh.name> Thu, 02 Mar 2017 12:51:40 -0400
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
- License: BSD-2-clause
|
- License: BSD-2-clause
|
||||||
-}
|
-}
|
||||||
|
|
||||||
{-# LANGUAGE CPP #-}
|
|
||||||
|
|
||||||
module Utility.SRV (
|
module Utility.SRV (
|
||||||
mkSRVTcp,
|
mkSRVTcp,
|
||||||
mkSRV,
|
mkSRV,
|
||||||
|
@ -42,12 +40,7 @@ lookupSRV :: SRV -> IO [HostPort]
|
||||||
lookupSRV (SRV srv) = do
|
lookupSRV (SRV srv) = do
|
||||||
seed <- makeResolvSeed defaultResolvConf
|
seed <- makeResolvSeed defaultResolvConf
|
||||||
r <- withResolver seed $ flip DNS.lookupSRV $ B8.fromString srv
|
r <- withResolver seed $ flip DNS.lookupSRV $ B8.fromString srv
|
||||||
return $
|
return $ either (const []) use r
|
||||||
#if MIN_VERSION_dns(1,0,0)
|
|
||||||
either (const []) use r
|
|
||||||
#else
|
|
||||||
maybe [] use r
|
|
||||||
#endif
|
|
||||||
where
|
where
|
||||||
use = orderHosts . map tohosts
|
use = orderHosts . map tohosts
|
||||||
tohosts (priority, weight, port, hostname) =
|
tohosts (priority, weight, port, hostname) =
|
||||||
|
|
|
@ -67,11 +67,7 @@ data UrlOptions = UrlOptions
|
||||||
{ userAgent :: Maybe UserAgent
|
{ userAgent :: Maybe UserAgent
|
||||||
, reqHeaders :: Headers
|
, reqHeaders :: Headers
|
||||||
, reqParams :: [CommandParam]
|
, reqParams :: [CommandParam]
|
||||||
#if MIN_VERSION_http_conduit(2,0,0)
|
|
||||||
, applyRequest :: Request -> Request
|
, applyRequest :: Request -> Request
|
||||||
#else
|
|
||||||
, applyRequest :: forall m. Request m -> Request m
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
instance Default UrlOptions
|
instance Default UrlOptions
|
||||||
|
@ -232,11 +228,7 @@ contentDispositionFilename s
|
||||||
drop 1 $ dropWhile (/= '"') s
|
drop 1 $ dropWhile (/= '"') s
|
||||||
| otherwise = Nothing
|
| otherwise = Nothing
|
||||||
|
|
||||||
#if MIN_VERSION_http_conduit(2,0,0)
|
|
||||||
headRequest :: Request -> Request
|
headRequest :: Request -> Request
|
||||||
#else
|
|
||||||
headRequest :: Request m -> Request m
|
|
||||||
#endif
|
|
||||||
headRequest r = r
|
headRequest r = r
|
||||||
{ method = methodHead
|
{ method = methodHead
|
||||||
-- remove defaut Accept-Encoding header, to get actual,
|
-- remove defaut Accept-Encoding header, to get actual,
|
||||||
|
|
|
@ -342,7 +342,7 @@ Executable git-annex
|
||||||
resourcet,
|
resourcet,
|
||||||
http-client,
|
http-client,
|
||||||
http-types,
|
http-types,
|
||||||
http-conduit,
|
http-conduit (>= 2.0.0),
|
||||||
time,
|
time,
|
||||||
old-locale,
|
old-locale,
|
||||||
esqueleto,
|
esqueleto,
|
||||||
|
@ -395,7 +395,7 @@ Executable git-annex
|
||||||
CPP-Options: -DWITH_WEBDAV
|
CPP-Options: -DWITH_WEBDAV
|
||||||
|
|
||||||
if flag(Assistant) && ! os(solaris)
|
if flag(Assistant) && ! os(solaris)
|
||||||
Build-Depends: dns, mountpoints
|
Build-Depends: dns (>= 1.0.0), mountpoints
|
||||||
CPP-Options: -DWITH_ASSISTANT
|
CPP-Options: -DWITH_ASSISTANT
|
||||||
|
|
||||||
if flag(Assistant)
|
if flag(Assistant)
|
||||||
|
|
Loading…
Reference in a new issue