diff options
-rw-r--r-- | CHANGELOG | 3 | ||||
-rw-r--r-- | Command/ImportFeed.hs | 8 | ||||
-rw-r--r-- | Logs/Unused.hs | 7 | ||||
-rw-r--r-- | Utility/Url.hs | 8 | ||||
-rw-r--r-- | git-annex.cabal | 8 |
5 files changed, 6 insertions, 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 diff --git a/Command/ImportFeed.hs b/Command/ImportFeed.hs index ebc763868..6318136f2 100644 --- a/Command/ImportFeed.hs +++ b/Command/ImportFeed.hs @@ -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 diff --git a/Logs/Unused.hs b/Logs/Unused.hs index 2361fedbc..a2f40410b 100644 --- a/Logs/Unused.hs +++ b/Logs/Unused.hs @@ -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) diff --git a/Utility/Url.hs b/Utility/Url.hs index 2b71b6be4..27bccd1b3 100644 --- a/Utility/Url.hs +++ b/Utility/Url.hs @@ -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)) diff --git a/git-annex.cabal b/git-annex.cabal index a2bf57b4e..bf36afa3a 100644 --- a/git-annex.cabal +++ b/git-annex.cabal @@ -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, |