Drop support for building with old versions of directory, feed, and http-types.
This commit is contained in:
parent
9ef7207d5a
commit
1c4e5f65fc
5 changed files with 6 additions and 28 deletions
|
@ -13,7 +13,8 @@ git-annex (6.20170301.2) UNRELEASED; urgency=medium
|
|||
in the warning message.
|
||||
* Windows: Improve handling of shebang in external special remote
|
||||
program, searching for the program in the PATH.
|
||||
* Drop support for building with old versions of dns and http-conduit.
|
||||
* Drop support for building with old versions of dns, http-conduit,
|
||||
directory, feed, and http-types.
|
||||
|
||||
-- Joey Hess <id@joeyh.name> Thu, 02 Mar 2017 12:51:40 -0400
|
||||
|
||||
|
|
|
@ -272,24 +272,16 @@ feedFile tmpl i extension = Utility.Format.format tmpl $
|
|||
, extractField "itempubdate" [pubdate $ item i]
|
||||
]
|
||||
where
|
||||
#if MIN_VERSION_feed(0,3,9)
|
||||
pubdate itm = case getItemPublishDate itm :: Maybe (Maybe UTCTime) of
|
||||
Just (Just d) -> Just $
|
||||
formatTime defaultTimeLocale "%F" d
|
||||
-- if date cannot be parsed, use the raw string
|
||||
_ -> replace "/" "-" <$> getItemPublishDateString itm
|
||||
#else
|
||||
pubdate _ = Nothing
|
||||
#endif
|
||||
|
||||
extractMetaData :: ToDownload -> MetaData
|
||||
#if MIN_VERSION_feed(0,3,9)
|
||||
extractMetaData i = case getItemPublishDate (item i) :: Maybe (Maybe UTCTime) of
|
||||
Just (Just d) -> unionMetaData meta (dateMetaData d meta)
|
||||
_ -> meta
|
||||
#else
|
||||
extractMetaData i = meta
|
||||
#endif
|
||||
where
|
||||
tometa (k, v) = (mkMetaFieldUnchecked k, S.singleton (toMetaValue v))
|
||||
meta = MetaData $ M.fromList $ map tometa $ extractFields i
|
||||
|
|
|
@ -15,8 +15,6 @@
|
|||
- Licensed under the GNU GPL version 3 or higher.
|
||||
-}
|
||||
|
||||
{-# LANGUAGE CPP #-}
|
||||
|
||||
module Logs.Unused (
|
||||
UnusedMap,
|
||||
updateUnusedLog,
|
||||
|
@ -93,14 +91,9 @@ readUnusedMap :: FilePath -> Annex UnusedMap
|
|||
readUnusedMap = log2map <$$> readUnusedLog
|
||||
|
||||
dateUnusedLog :: FilePath -> Annex (Maybe UTCTime)
|
||||
#if MIN_VERSION_directory(1,2,0)
|
||||
dateUnusedLog prefix = do
|
||||
f <- fromRepo $ gitAnnexUnusedLog prefix
|
||||
liftIO $ catchMaybeIO $ getModificationTime f
|
||||
#else
|
||||
-- old ghc's getModificationTime returned a ClockTime
|
||||
dateUnusedLog _prefix = return Nothing
|
||||
#endif
|
||||
|
||||
{- Set of unused keys. This is cached for speed. -}
|
||||
unusedKeys :: Annex (S.Set Key)
|
||||
|
|
|
@ -342,14 +342,6 @@ hAcceptEncoding = "Accept-Encoding"
|
|||
hContentDisposition :: CI.CI B.ByteString
|
||||
hContentDisposition = "Content-Disposition"
|
||||
|
||||
#if ! MIN_VERSION_http_types(0,7,0)
|
||||
hContentLength :: CI.CI B.ByteString
|
||||
hContentLength = "Content-Length"
|
||||
|
||||
hUserAgent :: CI.CI B.ByteString
|
||||
hUserAgent = "User-Agent"
|
||||
#endif
|
||||
|
||||
{- Use with eg:
|
||||
-
|
||||
- > catchJust (matchStatusCodeException (== notFound404))
|
||||
|
|
|
@ -326,7 +326,7 @@ Executable git-annex
|
|||
unix-compat,
|
||||
SafeSemaphore,
|
||||
async,
|
||||
directory,
|
||||
directory (>= 1.2),
|
||||
filepath,
|
||||
IfElse,
|
||||
MissingH,
|
||||
|
@ -343,8 +343,8 @@ Executable git-annex
|
|||
edit-distance,
|
||||
resourcet,
|
||||
http-client,
|
||||
http-types,
|
||||
http-conduit (>= 2.0.0),
|
||||
http-types (>= 0.7),
|
||||
http-conduit (>= 2.0),
|
||||
time,
|
||||
old-locale,
|
||||
esqueleto,
|
||||
|
@ -353,7 +353,7 @@ Executable git-annex
|
|||
persistent-template,
|
||||
aeson,
|
||||
unordered-containers,
|
||||
feed,
|
||||
feed (>= 0.3.9),
|
||||
regex-tdfa,
|
||||
socks,
|
||||
byteable,
|
||||
|
|
Loading…
Reference in a new issue