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.
|
in the warning message.
|
||||||
* 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 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
|
-- 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]
|
, extractField "itempubdate" [pubdate $ item i]
|
||||||
]
|
]
|
||||||
where
|
where
|
||||||
#if MIN_VERSION_feed(0,3,9)
|
|
||||||
pubdate itm = case getItemPublishDate itm :: Maybe (Maybe UTCTime) of
|
pubdate itm = case getItemPublishDate itm :: Maybe (Maybe UTCTime) of
|
||||||
Just (Just d) -> Just $
|
Just (Just d) -> Just $
|
||||||
formatTime defaultTimeLocale "%F" d
|
formatTime defaultTimeLocale "%F" d
|
||||||
-- if date cannot be parsed, use the raw string
|
-- if date cannot be parsed, use the raw string
|
||||||
_ -> replace "/" "-" <$> getItemPublishDateString itm
|
_ -> replace "/" "-" <$> getItemPublishDateString itm
|
||||||
#else
|
|
||||||
pubdate _ = Nothing
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extractMetaData :: ToDownload -> MetaData
|
extractMetaData :: ToDownload -> MetaData
|
||||||
#if MIN_VERSION_feed(0,3,9)
|
|
||||||
extractMetaData i = case getItemPublishDate (item i) :: Maybe (Maybe UTCTime) of
|
extractMetaData i = case getItemPublishDate (item i) :: Maybe (Maybe UTCTime) of
|
||||||
Just (Just d) -> unionMetaData meta (dateMetaData d meta)
|
Just (Just d) -> unionMetaData meta (dateMetaData d meta)
|
||||||
_ -> meta
|
_ -> meta
|
||||||
#else
|
|
||||||
extractMetaData i = meta
|
|
||||||
#endif
|
|
||||||
where
|
where
|
||||||
tometa (k, v) = (mkMetaFieldUnchecked k, S.singleton (toMetaValue v))
|
tometa (k, v) = (mkMetaFieldUnchecked k, S.singleton (toMetaValue v))
|
||||||
meta = MetaData $ M.fromList $ map tometa $ extractFields i
|
meta = MetaData $ M.fromList $ map tometa $ extractFields i
|
||||||
|
|
|
@ -15,8 +15,6 @@
|
||||||
- Licensed under the GNU GPL version 3 or higher.
|
- Licensed under the GNU GPL version 3 or higher.
|
||||||
-}
|
-}
|
||||||
|
|
||||||
{-# LANGUAGE CPP #-}
|
|
||||||
|
|
||||||
module Logs.Unused (
|
module Logs.Unused (
|
||||||
UnusedMap,
|
UnusedMap,
|
||||||
updateUnusedLog,
|
updateUnusedLog,
|
||||||
|
@ -93,14 +91,9 @@ readUnusedMap :: FilePath -> Annex UnusedMap
|
||||||
readUnusedMap = log2map <$$> readUnusedLog
|
readUnusedMap = log2map <$$> readUnusedLog
|
||||||
|
|
||||||
dateUnusedLog :: FilePath -> Annex (Maybe UTCTime)
|
dateUnusedLog :: FilePath -> Annex (Maybe UTCTime)
|
||||||
#if MIN_VERSION_directory(1,2,0)
|
|
||||||
dateUnusedLog prefix = do
|
dateUnusedLog prefix = do
|
||||||
f <- fromRepo $ gitAnnexUnusedLog prefix
|
f <- fromRepo $ gitAnnexUnusedLog prefix
|
||||||
liftIO $ catchMaybeIO $ getModificationTime f
|
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. -}
|
{- Set of unused keys. This is cached for speed. -}
|
||||||
unusedKeys :: Annex (S.Set Key)
|
unusedKeys :: Annex (S.Set Key)
|
||||||
|
|
|
@ -342,14 +342,6 @@ hAcceptEncoding = "Accept-Encoding"
|
||||||
hContentDisposition :: CI.CI B.ByteString
|
hContentDisposition :: CI.CI B.ByteString
|
||||||
hContentDisposition = "Content-Disposition"
|
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:
|
{- Use with eg:
|
||||||
-
|
-
|
||||||
- > catchJust (matchStatusCodeException (== notFound404))
|
- > catchJust (matchStatusCodeException (== notFound404))
|
||||||
|
|
|
@ -326,7 +326,7 @@ Executable git-annex
|
||||||
unix-compat,
|
unix-compat,
|
||||||
SafeSemaphore,
|
SafeSemaphore,
|
||||||
async,
|
async,
|
||||||
directory,
|
directory (>= 1.2),
|
||||||
filepath,
|
filepath,
|
||||||
IfElse,
|
IfElse,
|
||||||
MissingH,
|
MissingH,
|
||||||
|
@ -343,8 +343,8 @@ Executable git-annex
|
||||||
edit-distance,
|
edit-distance,
|
||||||
resourcet,
|
resourcet,
|
||||||
http-client,
|
http-client,
|
||||||
http-types,
|
http-types (>= 0.7),
|
||||||
http-conduit (>= 2.0.0),
|
http-conduit (>= 2.0),
|
||||||
time,
|
time,
|
||||||
old-locale,
|
old-locale,
|
||||||
esqueleto,
|
esqueleto,
|
||||||
|
@ -353,7 +353,7 @@ Executable git-annex
|
||||||
persistent-template,
|
persistent-template,
|
||||||
aeson,
|
aeson,
|
||||||
unordered-containers,
|
unordered-containers,
|
||||||
feed,
|
feed (>= 0.3.9),
|
||||||
regex-tdfa,
|
regex-tdfa,
|
||||||
socks,
|
socks,
|
||||||
byteable,
|
byteable,
|
||||||
|
|
Loading…
Reference in a new issue