Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ghc-path-io for openSUSE:Factory checked in at 2021-06-13 23:05:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-path-io (Old) and /work/SRC/openSUSE:Factory/.ghc-path-io.new.32437 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-path-io" Sun Jun 13 23:05:59 2021 rev:22 rq:899657 version:1.6.3 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-path-io/ghc-path-io.changes 2020-12-22 11:44:09.385751224 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-path-io.new.32437/ghc-path-io.changes 2021-06-13 23:06:14.735679691 +0200 @@ -1,0 +2,13 @@ +Sat Jun 5 17:16:16 UTC 2021 - [email protected] + +- Update path-io to version 1.6.3. + ## Path IO 1.6.3 + + * Fixed a bug that caused `removeDirLink` fail on Linux because of a + trailing slash that used to be passed to the underlying + `removeDirectoryLink` function from the `directory` package. [Issue + 59](https://github.com/mrkkrp/path-io/issues/59). + + * Works with GHC 9.0.1. + +------------------------------------------------------------------- Old: ---- path-io-1.6.2.tar.gz New: ---- path-io-1.6.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-path-io.spec ++++++ --- /var/tmp/diff_new_pack.VCgjkF/_old 2021-06-13 23:06:15.231680588 +0200 +++ /var/tmp/diff_new_pack.VCgjkF/_new 2021-06-13 23:06:15.235680596 +0200 @@ -1,7 +1,7 @@ # # spec file for package ghc-path-io # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 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 path-io %bcond_with tests Name: ghc-%{pkg_name} -Version: 1.6.2 +Version: 1.6.3 Release: 0 Summary: Interface to ???directory??? package for users of ???path??? License: BSD-3-Clause ++++++ path-io-1.6.2.tar.gz -> path-io-1.6.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-io-1.6.2/CHANGELOG.md new/path-io-1.6.3/CHANGELOG.md --- old/path-io-1.6.2/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200 +++ new/path-io-1.6.3/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200 @@ -1,3 +1,12 @@ +## Path IO 1.6.3 + +* Fixed a bug that caused `removeDirLink` fail on Linux because of a + trailing slash that used to be passed to the underlying + `removeDirectoryLink` function from the `directory` package. [Issue + 59](https://github.com/mrkkrp/path-io/issues/59). + +* Works with GHC 9.0.1. + ## Path IO 1.6.2 * Fixed a bug in the `findFilesWith` and based on it `findFiles` functions. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-io-1.6.2/Path/IO.hs new/path-io-1.6.3/Path/IO.hs --- old/path-io-1.6.2/Path/IO.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/path-io-1.6.3/Path/IO.hs 2001-09-09 03:46:40.000000000 +0200 @@ -13,7 +13,7 @@ -- Portability : portable -- -- This module provides an interface to "System.Directory" for users of the --- "Path" module. It also implements commonly used primitives like recursive +-- "Path" module. It also implements some extra functionality like recursive -- scanning and copying of directories, working with temporary -- files\/directories, etc. module Path.IO @@ -482,7 +482,7 @@ then do target <- getSymlinkTarget srcDir D.createDirectoryLink target $ - F.dropTrailingPathSeparator (toFilePath destDir) + toFilePath' destDir else ensureDir destDir when preserveDirPermissions $ ignoringIOErrors (copyPermissions srcDir destDir) @@ -1324,7 +1324,7 @@ m () createDirLink target' dest' = do let target = toFilePath target' - dest = F.dropTrailingPathSeparator (toFilePath dest') + dest = toFilePath' dest' liftIO $ D.createDirectoryLink target dest -- | Remove an existing /directory/ symbolic link. @@ -1359,7 +1359,7 @@ -- | Symlink path Path b t -> m FilePath -getSymlinkTarget = liftD (D.getSymbolicLinkTarget . F.dropTrailingPathSeparator) +getSymlinkTarget = liftD D.getSymbolicLinkTarget -- | Check whether the path refers to a symbolic link. An exception is thrown -- if the path does not exist or is inaccessible. @@ -1374,7 +1374,7 @@ -- -- @since 1.3.0 isSymlink :: MonadIO m => Path b t -> m Bool -isSymlink = liftD (D.pathIsSymbolicLink . F.dropTrailingPathSeparator) +isSymlink = liftD D.pathIsSymbolicLink ---------------------------------------------------------------------------- -- Temporary files and directories @@ -1697,8 +1697,8 @@ ---------------------------------------------------------------------------- -- Helpers --- | Lift action in 'IO' that takes 'FilePath' into action in slightly more --- abstract monad that takes 'Path'. +-- | Lift an action in 'IO' that takes 'FilePath' into an action in slightly +-- more abstract monad that takes 'Path'. liftD :: MonadIO m => -- | Original action @@ -1707,10 +1707,10 @@ Path b t -> -- | Lifted action m a -liftD m = liftIO . m . toFilePath +liftD m = liftIO . m . toFilePath' {-# INLINE liftD #-} --- | Similar to 'liftD' for functions with arity 2. +-- | Similar to 'liftD' but for functions with arity 2. liftD2 :: MonadIO m => -- | Original action @@ -1720,10 +1720,10 @@ -- | Second 'Path' argument Path b1 t1 -> m a -liftD2 m a b = liftIO $ m (toFilePath a) (toFilePath b) +liftD2 m a b = liftIO $ m (toFilePath' a) (toFilePath' b) {-# INLINE liftD2 #-} --- | Similar to 'liftD2', but allows to pass second argument of arbitrary +-- | Similar to 'liftD2', but allows us to pass second argument of arbitrary -- type. liftD2' :: MonadIO m => @@ -1734,9 +1734,13 @@ -- | Second argument v -> m a -liftD2' m a v = liftIO $ m (toFilePath a) v +liftD2' m a v = liftIO $ m (toFilePath' a) v {-# INLINE liftD2' #-} +-- | Like 'toFilePath', but also drops the trailing path separator. +toFilePath' :: Path b t -> FilePath +toFilePath' = F.dropTrailingPathSeparator . toFilePath + -- | Perform an action ignoring IO exceptions it may throw. ignoringIOErrors :: IO () -> IO () ignoringIOErrors ioe = ioe `catch` handler diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-io-1.6.2/README.md new/path-io-1.6.3/README.md --- old/path-io-1.6.2/README.md 2001-09-09 03:46:40.000000000 +0200 +++ new/path-io-1.6.3/README.md 2001-09-09 03:46:40.000000000 +0200 @@ -8,8 +8,8 @@ This package provides an interface to the [`directory`](https://hackage.haskell.org/package/directory) package for -users of Chris Done's [`path`](https://hackage.haskell.org/package/path). It -also implements some missing stuff like recursive scanning and copying of +users of [`path`](https://hackage.haskell.org/package/path). It also +implements some extra functionality like recursive scanning and copying of directories, working with temporary files/directories, etc. Consult Haddocks for usage, which should be trivial. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-io-1.6.2/path-io.cabal new/path-io-1.6.3/path-io.cabal --- old/path-io-1.6.2/path-io.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/path-io-1.6.3/path-io.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,11 +1,11 @@ cabal-version: 1.18 name: path-io -version: 1.6.2 +version: 1.6.3 license: BSD3 license-file: LICENSE.md maintainer: Mark Karpov <[email protected]> author: Mark Karpov <[email protected]> -tested-with: ghc ==8.6.5 ghc ==8.8.4 ghc ==8.10.2 +tested-with: ghc ==8.8.4 ghc ==8.10.4 ghc ==9.0.1 homepage: https://github.com/mrkkrp/path-io bug-reports: https://github.com/mrkkrp/path-io/issues synopsis: Interface to ???directory??? package for users of ???path??? @@ -29,8 +29,8 @@ exposed-modules: Path.IO default-language: Haskell2010 build-depends: - base >=4.12 && <5.0, - containers -any, + base >=4.13 && <5.0, + containers, directory >=1.3.2.0 && <1.4, dlist >=0.8 && <2.0, exceptions >=0.8 && <0.11, @@ -39,7 +39,7 @@ temporary >=1.1 && <1.4, time >=1.4 && <1.11, transformers >=0.3 && <0.6, - unix-compat -any + unix-compat if flag(dev) ghc-options: -Wall -Werror @@ -58,15 +58,15 @@ hs-source-dirs: tests default-language: Haskell2010 build-depends: - base >=4.12 && <5.0, + base >=4.13 && <5.0, directory >=1.3.2.0 && <1.4, exceptions >=0.8 && <0.11, hspec >=2.0 && <3.0, filepath >=1.2 && <1.5, path >=0.6 && <0.9, - path-io -any, + path-io, transformers >=0.3 && <0.6, - unix-compat -any + unix-compat if flag(dev) ghc-options: -Wall -Werror diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-io-1.6.2/tests/Main.hs new/path-io-1.6.3/tests/Main.hs --- old/path-io-1.6.2/tests/Main.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/path-io-1.6.3/tests/Main.hs 2001-09-09 03:46:40.000000000 +0200 @@ -18,8 +18,8 @@ main = hspec . around withSandbox $ do #ifndef mingw32_HOST_OS beforeWith populatedDir $ do - -- NOTE These tests shall fail on Windows as unix-compat does not - -- implement createSymbolicLink for windows. + -- NOTE These tests fail on Windows as unix-compat does not implement + -- createSymbolicLink for windows. describe "listDir" listDirSpec describe "listDirRel" listDirRelSpec describe "listDirRecur" listDirRecurSpec @@ -29,6 +29,7 @@ describe "copyDirRecur" copyDirRecurSpec describe "copyDirRecur'" copyDirRecur'Spec describe "findFile" findFileSpec + describe "removeDirLink" removeDirLinkSpec beforeWith populatedCyclicDir $ describe "listDirRecur Cyclic" listDirRecurCyclicSpec #endif @@ -89,10 +90,11 @@ f' <- filterM filePred f return (d', f') --- | walkDir with a Finish handler may have unpredictable output depending on --- the order of traversal. The only guarantee is that we will finish only after --- we find the directory "c". Though if we test only for the presence of "c" we --- are not really testing if we indeed cut the traversal short. +-- | 'walkDir' with a 'WalkFinish' handler may have unpredictable output +-- depending on the order of traversal. The only guarantee is that we will +-- finish only after we find the directory "c". Though if we test only for +-- the presence of "c" we are not really testing if we indeed cut the +-- traversal short. walkDirFinishSpec :: SpecWith (Path Abs Dir) walkDirFinishSpec = it "Finishes only after finding what it is looking for" $ \dir -> do @@ -143,13 +145,22 @@ found <- findFile (dir : undefined) relFile found `shouldBe` Just (dir </> relFile) +removeDirLinkSpec :: SpecWith (Path Abs Dir) +removeDirLinkSpec = it "remove dir link" $ \dir -> do + let target = dir </> $(mkRelDir "a") + link = dir </> $(mkRelDir "link-a") + createDirLink target link + removeDirLink link + exists <- doesDirExist link + exists `shouldBe` False + listDirRecurCyclicSpec :: SpecWith (Path Abs Dir) listDirRecurCyclicSpec = it "lists directory trees having traversal cycles" $ \dir -> getDirStructure listDirRecurCyclic dir `shouldReturn` populatedCyclicDirStructure --- Follows symbolic links +-- | Follows symbolic links. listDirRecurCyclic :: (MonadIO m, MonadThrow m) => -- | Directory to list @@ -244,9 +255,8 @@ -- Helpers -- | Create a sandbox directory to model some situation in it and run some --- tests. Note that we're using new unique sandbox directory for each test --- case to avoid contamination and it's unconditionally deleted after test --- case finishes. +-- tests. Note that we're using a new unique sandbox directory for each test +-- case and it's unconditionally deleted after test case finishes. withSandbox :: ActionWith (Path Abs Dir) -> IO () withSandbox = withSystemTempDir "path-io-sandbox" @@ -268,8 +278,8 @@ forM_ files $ (`writeFile` "") . toFilePath . withinSandbox return pdir --- | Get inner structure of a directory. Items are sorted, so it's easier to --- compare results. +-- | Get the inner structure of a directory. Items are sorted, so it's +-- easier to compare results. getDirStructure :: -- | Which function to use for scanning (Path Abs Dir -> IO ([Path Abs Dir], [Path Abs File])) ->
