Hello community,

here is the log from the commit of package ghc-conduit-extra for 
openSUSE:Factory checked in at 2016-03-16 10:33:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-conduit-extra (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-conduit-extra.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-conduit-extra"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-conduit-extra/ghc-conduit-extra.changes      
2016-02-23 16:59:30.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-conduit-extra.new/ghc-conduit-extra.changes 
2016-03-16 10:33:35.000000000 +0100
@@ -1,0 +2,6 @@
+Mon Mar  7 09:32:33 UTC 2016 - [email protected]
+
+- update to 1.1.11
+* withCheckedProcessCleanup
+
+-------------------------------------------------------------------

Old:
----
  conduit-extra-1.1.10.1.tar.gz

New:
----
  conduit-extra-1.1.11.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-conduit-extra.spec ++++++
--- /var/tmp/diff_new_pack.hsMZ7L/_old  2016-03-16 10:33:36.000000000 +0100
+++ /var/tmp/diff_new_pack.hsMZ7L/_new  2016-03-16 10:33:36.000000000 +0100
@@ -21,7 +21,7 @@
 %bcond_with tests
 
 Name:           ghc-conduit-extra
-Version:        1.1.10.1
+Version:        1.1.11
 Release:        0
 Summary:        Batteries included conduit: adapters for common libraries
 License:        MIT
@@ -39,6 +39,7 @@
 BuildRequires:  ghc-bytestring-devel
 BuildRequires:  ghc-conduit-devel
 BuildRequires:  ghc-directory-devel
+BuildRequires:  ghc-exceptions-devel
 BuildRequires:  ghc-filepath-devel
 BuildRequires:  ghc-monad-control-devel
 BuildRequires:  ghc-network-devel

++++++ conduit-extra-1.1.10.1.tar.gz -> conduit-extra-1.1.11.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/conduit-extra-1.1.10.1/ChangeLog.md 
new/conduit-extra-1.1.11/ChangeLog.md
--- old/conduit-extra-1.1.10.1/ChangeLog.md     2016-02-17 12:57:07.000000000 
+0100
+++ new/conduit-extra-1.1.11/ChangeLog.md       2016-03-03 10:58:27.000000000 
+0100
@@ -1,3 +1,7 @@
+## 1.1.11
+
+* `withCheckedProcessCleanup`
+
 ## 1.1.10.1
 
 * Fix a leftovers bug in helperDecompress #254
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/conduit-extra-1.1.10.1/Data/Conduit/Process.hs 
new/conduit-extra-1.1.11/Data/Conduit/Process.hs
--- old/conduit-extra-1.1.10.1/Data/Conduit/Process.hs  2016-02-17 
12:57:07.000000000 +0100
+++ new/conduit-extra-1.1.11/Data/Conduit/Process.hs    2016-03-03 
10:58:27.000000000 +0100
@@ -14,6 +14,7 @@
     ( -- * Functions
       sourceCmdWithConsumer
     , sourceProcessWithConsumer
+    , withCheckedProcessCleanup
       -- * Reexport
     , module Data.Streaming.Process
     ) where
@@ -26,6 +27,7 @@
 import Data.Conduit
 import Data.Conduit.Binary (sourceHandle, sinkHandle)
 import Data.ByteString (ByteString)
+import Control.Monad.Catch (MonadMask, onException, throwM)
 
 instance (r ~ (), MonadIO m, i ~ ByteString) => InputSource (ConduitM i o m r) 
where
     isStdStream = (\(Just h) -> return $ sinkHandle h, Just CreatePipe)
@@ -57,3 +59,24 @@
 -- Since 1.1.2
 sourceCmdWithConsumer :: MonadIO m => String -> Consumer ByteString m a -> m 
(ExitCode, a)
 sourceCmdWithConsumer cmd = sourceProcessWithConsumer (shell cmd)
+
+-- | Same as 'withCheckedProcess', but kills the child process in the case of
+-- an exception being thrown by the provided callback function.
+withCheckedProcessCleanup
+    :: ( InputSource stdin
+       , OutputSink stderr
+       , OutputSink stdout
+       , MonadIO m
+       , MonadMask m
+       )
+    => CreateProcess
+    -> (stdin -> stdout -> stderr -> m b)
+    -> m b
+withCheckedProcessCleanup cp f = do
+    (x, y, z, sph) <- streamingProcess cp
+    res <- f x y z `onException`
+            liftIO (terminateProcess (streamingProcessHandleRaw sph))
+    ec <- waitForStreamingProcess sph
+    if ec == ExitSuccess
+        then return res
+        else throwM $ ProcessExitedUnsuccessfully cp ec
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/conduit-extra-1.1.10.1/conduit-extra.cabal 
new/conduit-extra-1.1.11/conduit-extra.cabal
--- old/conduit-extra-1.1.10.1/conduit-extra.cabal      2016-02-17 
12:57:07.000000000 +0100
+++ new/conduit-extra-1.1.11/conduit-extra.cabal        2016-03-03 
10:58:27.000000000 +0100
@@ -1,5 +1,5 @@
 Name:                conduit-extra
-Version:             1.1.10.1
+Version:             1.1.11
 Synopsis:            Batteries included conduit: adapters for common libraries.
 Description:
     The conduit package itself maintains relative small dependencies. The 
purpose of this package is to collect commonly used utility functions wrapping 
other library dependencies, without depending on heavier-weight dependencies. 
The basic idea is that this package should only depend on haskell-platform 
packages and conduit.
@@ -39,6 +39,7 @@
                        -- No version bounds necessary, since they're inherited
                        -- from conduit.
                      , bytestring
+                     , exceptions
                      , monad-control
                      , text
                      , transformers


Reply via email to