Skip to content

Commit

Permalink
Revert "Make Setup.hs copy/install work when data-files uses **. (#…
Browse files Browse the repository at this point in the history
…6127)"

This reverts commit 7fec503.
  • Loading branch information
phadej committed Jul 3, 2019
1 parent 7fec503 commit a6fff36
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 44 deletions.
3 changes: 0 additions & 3 deletions Cabal/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@
* Uniformly provide 'Semigroup' instances for `base < 4.9` via `semigroups` package
* Setting `debug-info` now implies `library-stripping: False` and
`executable-stripping: False) ([#2702](https://github.com/haskell/cabal/issues/2702))
* `Setup.hs copy` and `install` now work in the presence of
`data-files` that use `**` syntax
([#6125](https://github.com/haskell/cabal/issues/6125)).

----

Expand Down
14 changes: 7 additions & 7 deletions Cabal/Distribution/Simple/Install.hs
Original file line number Diff line number Diff line change
Expand Up @@ -223,17 +223,17 @@ copyComponent _ _ _ (CTest _) _ _ = return ()
--
installDataFiles :: Verbosity -> PackageDescription -> FilePath -> IO ()
installDataFiles verbosity pkg_descr destDataDir =
flip traverse_ (dataFiles pkg_descr) $ \ glob -> do
flip traverse_ (dataFiles pkg_descr) $ \ file -> do
let srcDataDirRaw = dataDir pkg_descr
srcDataDir = if null srcDataDirRaw
then "."
else srcDataDirRaw
files <- matchDirFileGlob verbosity (specVersion pkg_descr) srcDataDir glob
for_ files $ \ file' -> do
let src = srcDataDir </> file'
dst = destDataDir </> file'
createDirectoryIfMissingVerbose verbosity True (takeDirectory dst)
installOrdinaryFile verbosity src dst
files <- matchDirFileGlob verbosity (specVersion pkg_descr) srcDataDir file
let dir = takeDirectory file
createDirectoryIfMissingVerbose verbosity True (destDataDir </> dir)
sequence_ [ installOrdinaryFile verbosity (srcDataDir </> file')
(destDataDir </> file')
| file' <- files ]

-- | Install the files listed in install-includes for a library
--
Expand Down
1 change: 0 additions & 1 deletion cabal-testsuite/PackageTests/Regression/T6125/Main.hs

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions cabal-testsuite/PackageTests/Regression/T6125/myprog.cabal

This file was deleted.

9 changes: 0 additions & 9 deletions cabal-testsuite/PackageTests/Regression/T6125/setup.cabal.out

This file was deleted.

8 changes: 0 additions & 8 deletions cabal-testsuite/PackageTests/Regression/T6125/setup.out

This file was deleted.

6 changes: 0 additions & 6 deletions cabal-testsuite/PackageTests/Regression/T6125/setup.test.hs

This file was deleted.

0 comments on commit a6fff36

Please sign in to comment.