Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-filepattern for openSUSE:Factory 
checked in at 2022-10-13 15:41:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-filepattern (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-filepattern.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-filepattern"

Thu Oct 13 15:41:56 2022 rev:4 rq:1008461 version:0.1.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-filepattern/ghc-filepattern.changes  
2020-12-22 11:39:30.705503439 +0100
+++ 
/work/SRC/openSUSE:Factory/.ghc-filepattern.new.2275/ghc-filepattern.changes    
    2022-10-13 15:42:00.946722766 +0200
@@ -1,0 +2,7 @@
+Sun Aug 21 18:06:19 UTC 2022 - Peter Simons <[email protected]>
+
+- Update filepattern to version 0.1.3.
+  0.1.3, released 2022-08-21
+      #5, remove invalid optimisation in the presence of symlinks
+
+-------------------------------------------------------------------

Old:
----
  filepattern-0.1.2.tar.gz

New:
----
  filepattern-0.1.3.tar.gz

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

Other differences:
------------------
++++++ ghc-filepattern.spec ++++++
--- /var/tmp/diff_new_pack.SA1UZv/_old  2022-10-13 15:42:01.438723726 +0200
+++ /var/tmp/diff_new_pack.SA1UZv/_new  2022-10-13 15:42:01.442723735 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-filepattern
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %global pkg_name filepattern
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.1.2
+Version:        0.1.3
 Release:        0
 Summary:        File path glob-like matching
 License:        BSD-3-Clause

++++++ filepattern-0.1.2.tar.gz -> filepattern-0.1.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/filepattern-0.1.2/CHANGES.txt 
new/filepattern-0.1.3/CHANGES.txt
--- old/filepattern-0.1.2/CHANGES.txt   2020-02-26 22:07:58.000000000 +0100
+++ new/filepattern-0.1.3/CHANGES.txt   2001-09-09 03:46:40.000000000 +0200
@@ -1,5 +1,7 @@
 Changelog for filepattern
 
+0.1.3, released 2022-08-21
+    #5, remove invalid optimisation in the presence of symlinks
 0.1.2, released 2020-02-26
     Optimise matchMany for empty lists
     Remove support for GHC 7.4 to 7.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/filepattern-0.1.2/LICENSE 
new/filepattern-0.1.3/LICENSE
--- old/filepattern-0.1.2/LICENSE       2020-02-16 20:14:14.000000000 +0100
+++ new/filepattern-0.1.3/LICENSE       2001-09-09 03:46:40.000000000 +0200
@@ -1,4 +1,4 @@
-Copyright Neil Mitchell 2011-2020.
+Copyright Neil Mitchell 2011-2022.
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/filepattern-0.1.2/README.md 
new/filepattern-0.1.3/README.md
--- old/filepattern-0.1.2/README.md     2019-05-26 13:34:48.000000000 +0200
+++ new/filepattern-0.1.3/README.md     2001-09-09 03:46:40.000000000 +0200
@@ -1,4 +1,4 @@
-# FilePattern [![Hackage 
version](https://img.shields.io/hackage/v/filepattern.svg?label=Hackage)](https://hackage.haskell.org/package/filepattern)
 [![Stackage 
version](https://www.stackage.org/package/filepattern/badge/nightly?label=Stackage)](https://www.stackage.org/package/filepattern)
 [![Linux build 
status](https://img.shields.io/travis/ndmitchell/filepattern/master.svg?label=Linux%20build)](https://travis-ci.org/ndmitchell/filepattern)
 [![Windows build 
status](https://img.shields.io/appveyor/ci/ndmitchell/filepattern/master.svg?label=Windows%20build)](https://ci.appveyor.com/project/ndmitchell/filepattern)
+# FilePattern [![Hackage 
version](https://img.shields.io/hackage/v/filepattern.svg?label=Hackage)](https://hackage.haskell.org/package/filepattern)
 [![Stackage 
version](https://www.stackage.org/package/filepattern/badge/nightly?label=Stackage)](https://www.stackage.org/package/filepattern)
 [![Build 
status](https://img.shields.io/github/workflow/status/ndmitchell/filepattern/ci/master.svg)](https://github.com/ndmitchell/filepattern/actions)
 
 A library for matching files using patterns such as `src/**/*.png` for all 
`.png` files recursively under the `src` directory. There are two special forms:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/filepattern-0.1.2/Setup.hs 
new/filepattern-0.1.3/Setup.hs
--- old/filepattern-0.1.2/Setup.hs      2020-02-26 22:08:55.000000000 +0100
+++ new/filepattern-0.1.3/Setup.hs      1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-import Distribution.Simple
-main = defaultMain
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/filepattern-0.1.2/filepattern.cabal 
new/filepattern-0.1.3/filepattern.cabal
--- old/filepattern-0.1.2/filepattern.cabal     2020-02-26 22:08:05.000000000 
+0100
+++ new/filepattern-0.1.3/filepattern.cabal     2001-09-09 03:46:40.000000000 
+0200
@@ -1,13 +1,13 @@
-cabal-version:      >= 1.18
+cabal-version:      1.18
 build-type:         Simple
 name:               filepattern
-version:            0.1.2
+version:            0.1.3
 license:            BSD3
 license-file:       LICENSE
 category:           Development, FilePath
 author:             Neil Mitchell <[email protected]>, Evan Rutledge Borden 
<[email protected]>
 maintainer:         Neil Mitchell <[email protected]>
-copyright:          Neil Mitchell 2011-2020
+copyright:          Neil Mitchell 2011-2022
 synopsis:           File path glob-like matching
 description:
     A library for matching files using patterns such as @\"src\/**\/*.png\"@ 
for all @.png@ files
@@ -28,7 +28,7 @@
     Originally taken from the <https://hackage.haskell.org/package/shake Shake 
library>.
 homepage:           https://github.com/ndmitchell/filepattern#readme
 bug-reports:        https://github.com/ndmitchell/filepattern/issues
-tested-with:        GHC==8.8.1, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, 
GHC==8.0.2, GHC==7.10.3
+tested-with:        GHC==9.0, GHC==8.10, GHC==8.8, GHC==8.6, GHC==8.4, 
GHC==8.2, GHC==8.0
 extra-doc-files:
     CHANGES.txt
     README.md
@@ -45,8 +45,6 @@
         directory,
         extra >= 1.6.2,
         filepath
-    if impl(ghc < 8.0)
-        build-depends: semigroups >= 0.18
     exposed-modules:
         System.FilePattern
         System.FilePattern.Directory
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/filepattern-0.1.2/src/System/FilePattern/Directory.hs 
new/filepattern-0.1.3/src/System/FilePattern/Directory.hs
--- old/filepattern-0.1.2/src/System/FilePattern/Directory.hs   2019-05-04 
09:41:16.000000000 +0200
+++ new/filepattern-0.1.3/src/System/FilePattern/Directory.hs   2001-09-09 
03:46:40.000000000 +0200
@@ -78,24 +78,26 @@
 
         -- parts is a series of path components joined with trailing / 
characters
         f parts yes no
-            | StepEverything <- stepNext no = return []
-            | not slow, StepOnly xs <- stepNext yes = g parts yes no xs False
+            | StepEverything <- stepNext no = pure []
+            | not slow, StepOnly xs <- stepNext yes = g parts yes no xs
             | otherwise = do
                 xs <- filter (not . all (== '.')) <$> getDirectoryContents 
(root ++ parts)
-                g parts yes no xs True
+                g parts yes no xs
 
-        -- doesExist means that one of doesFileExist or doesDirectoryExist is 
true
-        g parts yes no xs doesExist =
+        g parts yes no xs =
             concatForM (sort xs) $ \x -> do
                 let path = root ++ parts ++ x
                 -- deliberately shadow since using yes/no from now on would be 
wrong
-                yes <- return $ stepApply yes x
-                no <- return $ stepApply no x
-                isFile <- if stepDone yes /= [] && stepDone no == [] then Just 
<$> doesFileExist path else return Nothing
+                yes <- pure $ stepApply yes x
+                no <- pure $ stepApply no x
+                isFile <- whenMaybe (stepDone yes /= [] && stepDone no == []) 
(doesFileExist path)
                 case isFile of
-                    Just True -> return [parts ++ x]
-                    _ | StepEverything <- stepNext no -> return []
-                      | StepOnly [] <- stepNext yes -> return []
+                    Just True -> pure [parts ++ x]
+                    _ | StepEverything <- stepNext no -> pure []
+                      | StepOnly [] <- stepNext yes -> pure []
                       | otherwise -> do
-                        b <- if doesExist && isFile == Just False then return 
True else doesDirectoryExist path
-                        if not b then return [] else f (parts ++ x ++ "/") yes 
no
+                        -- Here we used to assume that getDirectoryContents 
means something exists,
+                        -- doesFileExists is False, therefore this must be a 
directory.
+                        -- That's not true in the presence of symlinks.
+                        b <- doesDirectoryExist path
+                        if not b then pure [] else f (parts ++ x ++ "/") yes no
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/filepattern-0.1.2/src/System/FilePattern/Wildcard.hs 
new/filepattern-0.1.3/src/System/FilePattern/Wildcard.hs
--- old/filepattern-0.1.2/src/System/FilePattern/Wildcard.hs    2019-01-11 
10:49:20.000000000 +0100
+++ new/filepattern-0.1.3/src/System/FilePattern/Wildcard.hs    2001-09-09 
03:46:40.000000000 +0200
@@ -22,7 +22,6 @@
 import Data.Functor
 import Data.List.Extra
 import Control.Applicative
-import Control.Monad.Extra
 import System.FilePattern.ListBy
 import Data.Traversable
 import qualified Data.Foldable as F
@@ -46,7 +45,7 @@
     (pre, x) <- stripPrefixBy eq pre x
     (x, post) <- stripSuffixBy eq post x
     mid <- stripInfixes mid x
-    return $ [Left pre] ++ mid ++ [Left post]
+    pure $ [Left pre] ++ mid ++ [Left post]
     where
         stripInfixes [] x = Just [Right x]
         stripInfixes (m:ms) y = do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/filepattern-0.1.2/test/Test/Util.hs 
new/filepattern-0.1.3/test/Test/Util.hs
--- old/filepattern-0.1.2/test/Test/Util.hs     2020-02-16 19:16:35.000000000 
+0100
+++ new/filepattern-0.1.3/test/Test/Util.hs     2001-09-09 03:46:40.000000000 
+0200
@@ -96,7 +96,7 @@
 substituteErr :: Partial => FilePattern -> [String] -> [String] -> IO ()
 substituteErr pat parts want = do
     addTestData [pat] []
-    assertException (return $ FP.substitute pat parts) want "substitute" 
["Pattern" #= pat, "Parts" #= parts]
+    assertException (pure $ FP.substitute pat parts) want "substitute" 
["Pattern" #= pat, "Parts" #= parts]
 
 
 stepNext :: [FilePattern] -> [String] -> FP.StepNext -> IO ()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/filepattern-0.1.2/test/Test.hs 
new/filepattern-0.1.3/test/Test.hs
--- old/filepattern-0.1.2/test/Test.hs  2019-02-13 00:02:23.000000000 +0100
+++ new/filepattern-0.1.3/test/Test.hs  2001-09-09 03:46:40.000000000 +0200
@@ -64,8 +64,8 @@
     T.assertBool (sort resOne == sort resMany) "matchMany" []
     putStrLn $ "Passed " ++ show (length xs ^ 2) ++ " properties on specific 
cases"
     Success{} <- quickCheckWithResult stdArgs{maxSuccess=10000} $ \(ArbPattern 
p) (ArbPath x) ->
-        (if p ?== x then label "match" else property) $ unsafePerformIO $ prop 
p x >> return True
-    return ()
+        (if p ?== x then label "match" else property) $ unsafePerformIO $ prop 
p x >> pure True
+    pure ()
     where
         prop :: FilePattern -> FilePath -> IO (Maybe [String])
         prop pat file = do
@@ -78,4 +78,4 @@
             let norm = (\x -> if null x then [""] else x) . filter (/= ".") . 
split isPathSeparator
             when (isJust ans) $ let res = substitute pat (fromJust $ 
FilePattern.match pat file) in
                 T.assertBool (norm res == norm file) "substitute" $ fields ++ 
["Match" T.#= FilePattern.match pat file, "Got" T.#= res, "Input (norm)" T.#= 
norm file, "Got (norm)" T.#= norm res]
-            return ans
+            pure ans

Reply via email to