[Pkg-haskell-commits] darcs: darcs-monitor: Add patches to compile with newer base and current HaXml

Joachim Breitner mail at joachim-breitner.de
Sat May 18 14:04:35 UTC 2013


Sat May 18 13:56:33 UTC 2013  Joachim Breitner <mail at joachim-breitner.de>
  * Add patches to compile with newer base and current HaXml 
  Ignore-this: 5c0fb11a384ba9e8258236d2a0e4c8ef

    M ./changelog +6
    M ./control -2 +2
    A ./patches/
    A ./patches/catch
    A ./patches/haxml-2.22-compat
    A ./patches/series

Sat May 18 13:56:33 UTC 2013  Joachim Breitner <mail at joachim-breitner.de>
  * Add patches to compile with newer base and current HaXml 
  Ignore-this: 5c0fb11a384ba9e8258236d2a0e4c8ef
diff -rN -u old-darcs-monitor//changelog new-darcs-monitor//changelog
--- old-darcs-monitor//changelog	2013-05-18 14:04:35.050537760 +0000
+++ new-darcs-monitor//changelog	2013-05-18 14:04:35.105539014 +0000
@@ -1,3 +1,9 @@
+darcs-monitor (0.4.2-2) UNRELEASED; urgency=low
+
+  * Add patches to compile with newer base and current HaXml (Closes: #629784)
+
+ -- Joachim Breitner <nomeata at debian.org>  Sat, 18 May 2013 15:54:22 +0200
+
 darcs-monitor (0.4.2-1) experimental; urgency=low
 
   * New upstream version.
diff -rN -u old-darcs-monitor//control new-darcs-monitor//control
--- old-darcs-monitor//control	2013-05-18 14:04:35.038546470 +0000
+++ new-darcs-monitor//control	2013-05-18 14:04:35.105539014 +0000
@@ -8,8 +8,8 @@
   , haskell-devscripts (>= 0.8.13)
   , ghc
   , libghc-mtl-dev
-  , libghc-haxml-dev (>= 1:1.20)
-  , libghc-haxml-dev (<< 1:1.21)
+  , libghc-haxml-dev (>= 1:1.22)
+  , libghc-haxml-dev (<< 1:1.24)
 Standards-Version: 3.9.4
 Homepage: http://wiki.darcs.net/RelatedSoftware/DarcsMonitor
 Vcs-Darcs: http://darcs.debian.org/pkg-haskell/darcs-monitor
diff -rN -u old-darcs-monitor//patches/catch new-darcs-monitor//patches/catch
--- old-darcs-monitor//patches/catch	1970-01-01 00:00:00.000000000 +0000
+++ new-darcs-monitor//patches/catch	2013-05-18 14:04:35.097553348 +0000
@@ -0,0 +1,27 @@
+Description: Use Control.Exception.catch
+Author: Joachim Breitner <nomeata at debian.org>
+
+--- darcs-monitor-0.4.2.orig/darcs-monitor.hs
++++ darcs-monitor-0.4.2/darcs-monitor.hs
+@@ -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.Exit
+ 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
+@@ -184,7 +186,7 @@ readSeenPatches :: MonadIO m => String -
+ readSeenPatches repo =
+   liftIO $ catch (do fc <- readFile (repo ++ seenPatchesFileName)
+                      return (read fc)
+-                 ) $ \_ -> return Map.empty
++                 ) $ \(_::IOException) -> return Map.empty
+ 
+ 
+ processRepo :: (MonadConfig m, MonadIO m) => Bool -> Command m -> FilePath -> m ()
diff -rN -u old-darcs-monitor//patches/haxml-2.22-compat new-darcs-monitor//patches/haxml-2.22-compat
--- old-darcs-monitor//patches/haxml-2.22-compat	1970-01-01 00:00:00.000000000 +0000
+++ new-darcs-monitor//patches/haxml-2.22-compat	2013-05-18 14:04:35.062541728 +0000
@@ -0,0 +1,49 @@
+Description: HaXml 2.22 compatibilitiy
+Author: Joachim Breitner <nomeata at debian.org>
+Bug-Debian: http://bugs.debian.org/629784
+
+--- darcs-monitor-0.4.2.orig/darcs-monitor.cabal
++++ darcs-monitor-0.4.2/darcs-monitor.cabal
+@@ -28,7 +28,7 @@ flag splitBase
+   description: Choose the new smaller, split-up base package.
+ 
+ Executable darcs-monitor
+-  Build-Depends: mtl, HaXml == 1.20.*
++  Build-Depends: mtl, HaXml >= 1.22 && <= 1.24
+   if flag(splitBase)
+     Build-Depends: base >=3 && < 5, containers, directory, process
+   else
+--- darcs-monitor-0.4.2.orig/darcs-monitor.hs
++++ darcs-monitor-0.4.2/darcs-monitor.hs
+@@ -194,15 +196,15 @@ processRepo dryRun (tag,cmd) repo' = do
+   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 +253,7 @@ getAttr name attrs = case lookup name at
+                                      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 -rN -u old-darcs-monitor//patches/series new-darcs-monitor//patches/series
--- old-darcs-monitor//patches/series	1970-01-01 00:00:00.000000000 +0000
+++ new-darcs-monitor//patches/series	2013-05-18 14:04:35.062541728 +0000
@@ -0,0 +1,2 @@
+haxml-2.22-compat
+catch





More information about the Pkg-haskell-commits mailing list