Hello community,

here is the log from the commit of package ghc-shelly for openSUSE:Factory 
checked in at 2015-10-06 13:24:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-shelly (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-shelly.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-shelly"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-shelly/ghc-shelly.changes    2015-09-17 
09:19:34.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-shelly.new/ghc-shelly.changes       
2015-10-06 13:24:27.000000000 +0200
@@ -1,0 +2,5 @@
+Sun Sep 27 10:18:21 UTC 2015 - [email protected]
+
+- update to 1.6.4
+
+-------------------------------------------------------------------

Old:
----
  shelly-1.6.3.4.tar.gz

New:
----
  shelly-1.6.4.tar.gz

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

Other differences:
------------------
++++++ ghc-shelly.spec ++++++
--- /var/tmp/diff_new_pack.SdprvL/_old  2015-10-06 13:24:28.000000000 +0200
+++ /var/tmp/diff_new_pack.SdprvL/_new  2015-10-06 13:24:28.000000000 +0200
@@ -21,7 +21,7 @@
 %bcond_with tests
 
 Name:           ghc-shelly
-Version:        1.6.3.4
+Version:        1.6.4
 Release:        0
 Summary:        Shell-like (systems) programming in Haskell
 License:        BSD-3-Clause

++++++ shelly-1.6.3.4.tar.gz -> shelly-1.6.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shelly-1.6.3.4/shelly.cabal 
new/shelly-1.6.4/shelly.cabal
--- old/shelly-1.6.3.4/shelly.cabal     2015-09-10 04:06:19.000000000 +0200
+++ new/shelly-1.6.4/shelly.cabal       2015-09-26 20:25:57.000000000 +0200
@@ -1,6 +1,6 @@
 Name:       shelly
 
-Version:     1.6.3.4
+Version:     1.6.4
 Synopsis:    shell-like (systems) programming in Haskell
 
 Description: Shelly provides convenient systems programming in Haskell,
@@ -88,6 +88,25 @@
   type: exitcode-stdio-1.0
   hs-source-dirs: src test/src
   main-is: TestMain.hs
+  other-modules:
+    CopySpec
+    EnvSpec
+    FailureSpec
+    FindSpec
+    Help
+    LiftedSpec
+    MoveSpec
+    ReadFileSpec
+    RmSpec
+    RunSpec
+    Shelly
+    Shelly.Base
+    Shelly.Find
+    Shelly.Lifted
+    TestInit
+    WhichSpec
+    WriteSpec
+
   ghc-options: -O2 -Wall -fwarn-tabs -funbox-strict-fields -threaded
                -fno-warn-unused-do-bind -fno-warn-type-defaults
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shelly-1.6.3.4/src/Shelly.hs 
new/shelly-1.6.4/src/Shelly.hs
--- old/shelly-1.6.3.4/src/Shelly.hs    2015-09-10 04:01:48.000000000 +0200
+++ new/shelly-1.6.4/src/Shelly.hs      2015-09-26 20:24:15.000000000 +0200
@@ -30,7 +30,8 @@
          , log_stdout_with, log_stderr_with
 
          -- * Running external commands.
-         , run, run_, bash, bash_, runFoldLines, cmd, FoldCallback
+         , run, run_, runFoldLines, cmd, FoldCallback
+         , bash, bash_, bashPipeFail
          , (-|-), lastStderr, setStdin, lastExitCode
          , command, command_, command1, command1_
          , sshPairs, sshPairs_
@@ -1067,8 +1068,7 @@
 run :: FilePath -> [Text] -> Sh Text
 run fp args = return . lineSeqToText =<< runFoldLines mempty (|>) fp args
 
--- | Like `run`, but it invokes the user-requested program with _bash_,
--- setting _pipefail_ appropriately.
+-- | Like `run`, but it invokes the user-requested program with _bash_.
 bash :: FilePath -> [Text] -> Sh Text
 bash fp args = escaping False $ run "bash" $ bashArgs fp args
 
@@ -1076,15 +1076,16 @@
 bash_ fp args = escaping False $ run_ "bash" $ bashArgs fp args
 
 bashArgs :: FilePath -> [Text] -> [Text]
-bashArgs fp args =
-  -- trapping PIPE is needed to avoid random failures from setting pipefail
-  --
-  -- https://github.com/yesodweb/Shelly.hs/issues/106
-  -- 
http://stackoverflow.com/questions/22464786/ignoring-bash-pipefail-for-error-code-141
-  ["-c", "'set -o pipefail; trap '' PIPE; " <> sanitise (toTextIgnore fp : 
args) <> "'"]
+bashArgs fp args = ["-c", "'" <> sanitise (toTextIgnore fp : args) <> "'"]
   where
     sanitise = T.replace "'" "\'" . T.intercalate " "
 
+-- | Use this with `bash` to set _pipefail_
+--
+-- > bashPipeFail $ bash "echo foo | echo"
+bashPipeFail :: (FilePath -> [Text] -> Sh a) -> FilePath -> [Text] -> Sh a
+bashPipeFail runner fp args = runner "set -o pipefail;" (toTextIgnore fp : 
args)
+
 -- | bind some arguments to run for re-use. Example:
 --
 -- > monit = command "monit" ["-c", "monitrc"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shelly-1.6.3.4/test/src/RunSpec.hs 
new/shelly-1.6.4/test/src/RunSpec.hs
--- old/shelly-1.6.3.4/test/src/RunSpec.hs      2015-07-23 05:57:56.000000000 
+0200
+++ new/shelly-1.6.4/test/src/RunSpec.hs        2015-09-26 20:25:16.000000000 
+0200
@@ -40,11 +40,14 @@
                     $ bash "cat" [ "test/data/nonascii.txt" ]
       res @?= "Selbstverst\228ndlich \252berraschend\n"
 
+    {- This throws spurious errors on some systems
     it "can detect failing commands in pipes" $ do
       eCode <- shelly $ escaping False $ errExit False $ do
-        bash_ "echo" [ "'foo'", "|", "ls", "\"eoueouoe\"", "2>/dev/null", "|", 
"echo", "'bar'" ]
+        bashPipeFail
+          bash_ "echo" ["'foo'", "|", "ls", "\"eoueouoe\"", "2>/dev/null", 
"|", "echo", "'bar'" ]
         lastExitCode
       eCode `shouldSatisfy` (/= 0)
+      -}
 
     it "preserve pipe behaviour" $ do
       (eCode, res) <- shelly $ escaping False $ errExit False $ do


Reply via email to