[Pkg-haskell-commits] [package-plan] 01/02: Include darcs-monitor again

Joachim Breitner nomeata at moszumanska.debian.org
Thu Jun 11 08:41:44 UTC 2015


This is an automated email from the git hooks/post-receive script.

nomeata pushed a commit to branch master
in repository package-plan.

commit 4abab75b5e2eaf2fa98d7e0e48b620aac66f614f
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Thu Jun 11 10:41:15 2015 +0200

    Include darcs-monitor again
---
 packages.txt                                  |  2 +-
 patches/darcs-monitor/0.4.2/catch             | 33 +++++++++++++++++
 patches/darcs-monitor/0.4.2/haxml-2.22-compat | 53 +++++++++++++++++++++++++++
 patches/darcs-monitor/0.4.2/series            |  2 +
 4 files changed, 89 insertions(+), 1 deletion(-)

diff --git a/packages.txt b/packages.txt
index 77db399..ea7911b 100644
--- a/packages.txt
+++ b/packages.txt
@@ -152,7 +152,7 @@ csv 0.1.2
 csv-conduit 0.6.6
 curl 1.3.8
 darcs 2.10.0 binary=darcs -fpkgconfig -fcurl -f-http -fterminfo notest
-darcs-monitor 0.4.2 ignore # binary broken, HaXml dependency too old
+darcs-monitor 0.4.2 binary=darcs-monitor
 data-accessor 0.2.2.6
 data-accessor-mtl 0.2.0.4
 data-accessor-template 0.2.1.11
diff --git a/patches/darcs-monitor/0.4.2/catch b/patches/darcs-monitor/0.4.2/catch
new file mode 100644
index 0000000..1072a6a
--- /dev/null
+++ b/patches/darcs-monitor/0.4.2/catch
@@ -0,0 +1,33 @@
+Description: Use Control.Exception.catch
+Author: Joachim Breitner <nomeata at debian.org>
+
+Index: darcs-monitor-0.4.2/darcs-monitor.hs
+===================================================================
+--- darcs-monitor-0.4.2.orig/darcs-monitor.hs	2013-05-18 15:43:35.000000000 +0200
++++ darcs-monitor-0.4.2/darcs-monitor.hs	2013-05-18 16:02:25.847617172 +0200
+@@ -1,3 +1,4 @@
++{-# LANGUAGE ScopedTypeVariables #-}
+ {-  darcs-monitor - Darcs repository monitor
+     Copyright © 2007 Antti-Juhani Kaijanaho
+     Copyright © 2007 Benja Fallenstein
+@@ -36,6 +37,7 @@
+ import System.IO
+ import Text.XML.HaXml hiding (when,version,x,tag,cdata)
+ import Text.XML.HaXml.Posn
++import Control.Exception (catch, IOException)
+ 
+ import Config
+ import Darcs
+@@ -182,9 +184,9 @@
+ 
+ readSeenPatches :: MonadIO m => String -> m SeenPatches
+ readSeenPatches repo =
+-  liftIO $ catch (do fc <- readFile (repo ++ seenPatchesFileName)
+-                     return (read fc)
+-                 ) $ \_ -> return Map.empty
++  liftIO $ Control.Exception.catch (do fc <- readFile (repo ++ seenPatchesFileName)
++                                       return (read fc)
++                 ) $ \(_::IOException) -> return Map.empty
+ 
+ 
+ processRepo :: (MonadConfig m, MonadIO m) => Bool -> Command m -> FilePath -> m ()
diff --git a/patches/darcs-monitor/0.4.2/haxml-2.22-compat b/patches/darcs-monitor/0.4.2/haxml-2.22-compat
new file mode 100644
index 0000000..028bf37
--- /dev/null
+++ b/patches/darcs-monitor/0.4.2/haxml-2.22-compat
@@ -0,0 +1,53 @@
+Description: HaXml 2.22 compatibilitiy
+Author: Joachim Breitner <nomeata at debian.org>
+Bug-Debian: http://bugs.debian.org/629784
+
+Index: darcs-monitor-0.4.2/darcs-monitor.cabal
+===================================================================
+--- darcs-monitor-0.4.2.orig/darcs-monitor.cabal	2015-06-11 10:37:49.439871961 +0200
++++ darcs-monitor-0.4.2/darcs-monitor.cabal	2015-06-11 10:38:04.772409588 +0200
+@@ -28,7 +28,7 @@
+   description: Choose the new smaller, split-up base package.
+ 
+ Executable darcs-monitor
+-  Build-Depends: mtl, HaXml == 1.20.*
++  Build-Depends: mtl, HaXml >= 1.25 && <= 1.26
+   if flag(splitBase)
+     Build-Depends: base >=3 && < 5, containers, directory, process
+   else
+Index: darcs-monitor-0.4.2/darcs-monitor.hs
+===================================================================
+--- darcs-monitor-0.4.2.orig/darcs-monitor.hs	2015-06-11 10:37:49.439871961 +0200
++++ darcs-monitor-0.4.2/darcs-monitor.hs	2015-06-11 10:37:49.435871820 +0200
+@@ -194,15 +194,15 @@
+   liftIO $ createDirectoryIfMissing True (repo++dir)
+   seenPatches <- readSeenPatches repo
+   xml <- invokeDarcs ["changes", "--reverse", "--repo="++repo,"--xml-output","-a"]
+-  let Document _ _ (Elem "changelog" _ content) _ = xmlParse repo xml 
++  let Document _ _ (Elem (N "changelog") _ content) _ = xmlParse repo xml 
+   let patches
+         = filter (\c -> case c of CElem _e _ -> True ; _ -> False) content
+-  spl <- forM patches $ \ (CElem (Elem "patch" attrs content_) _) -> 
+-      do let author = getAttr "author" attrs
+-             localDate = getAttr "local_date" attrs
+-             hash = getAttr "hash" attrs
+-             name = getElem "name" content_
+-             comment = getElem "comment" content_
++  spl <- forM patches $ \ (CElem (Elem (N "patch") attrs content_) _) -> 
++      do let author = getAttr (N "author") attrs
++             localDate = getAttr (N "local_date") attrs
++             hash = getAttr (N "hash") attrs
++             name = getElem (N "name") content_
++             comment = getElem (N "comment") content_
+              (authorName, authorEmail) = parseAuthor author
+              dt = PatchData { patchRepo = repo
+                             , patchAuthor = authorName
+@@ -251,7 +251,7 @@
+                                      massage ss
+           massage [] = id
+ 
+-getElem :: Name -> [Content Posn] -> String
++getElem :: QName -> [Content Posn] -> String
+ getElem name (CElem (Elem name' _ content) _ : _rest)
+     | name == name'     = getContent content ""
+ getElem name (_ : rest) = getElem name rest
diff --git a/patches/darcs-monitor/0.4.2/series b/patches/darcs-monitor/0.4.2/series
new file mode 100644
index 0000000..3cdde4f
--- /dev/null
+++ b/patches/darcs-monitor/0.4.2/series
@@ -0,0 +1,2 @@
+haxml-2.22-compat
+catch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-haskell/package-plan.git



More information about the Pkg-haskell-commits mailing list