You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-vcs/git-annex/files/git-annex-5.20140717-old-fe...

25 lines
797 B

commit d15bfc9061d370b22ba4de8146fab92d3fa3ff02
Author: Joey Hess <joey@kitenet.net>
Date: Sat Jul 19 18:30:08 2014 -0400
fix build with old feed
diff --git a/Command/ImportFeed.hs b/Command/ImportFeed.hs
index e785885..1fdba46 100644
--- a/Command/ImportFeed.hs
+++ b/Command/ImportFeed.hs
@@ -227,9 +227,13 @@ feedFile tmpl i extension = Utility.Format.format tmpl $
#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