diff --git a/Cabal/ChangeLog.md b/Cabal/ChangeLog.md index 0a182b128be..fedb2d5ce8b 100644 --- a/Cabal/ChangeLog.md +++ b/Cabal/ChangeLog.md @@ -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)). ---- diff --git a/Cabal/Distribution/Simple/Install.hs b/Cabal/Distribution/Simple/Install.hs index 5dc45924d01..4ecd80beb16 100644 --- a/Cabal/Distribution/Simple/Install.hs +++ b/Cabal/Distribution/Simple/Install.hs @@ -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 -- diff --git a/cabal-testsuite/PackageTests/Regression/T6125/Main.hs b/cabal-testsuite/PackageTests/Regression/T6125/Main.hs deleted file mode 100644 index b3549c2fe3d..00000000000 --- a/cabal-testsuite/PackageTests/Regression/T6125/Main.hs +++ /dev/null @@ -1 +0,0 @@ -main = return () diff --git a/cabal-testsuite/PackageTests/Regression/T6125/data/foo/bar.html b/cabal-testsuite/PackageTests/Regression/T6125/data/foo/bar.html deleted file mode 100644 index 99fd1d469d9..00000000000 --- a/cabal-testsuite/PackageTests/Regression/T6125/data/foo/bar.html +++ /dev/null @@ -1 +0,0 @@ -Some random data. diff --git a/cabal-testsuite/PackageTests/Regression/T6125/myprog.cabal b/cabal-testsuite/PackageTests/Regression/T6125/myprog.cabal deleted file mode 100644 index 935cdb8b8c3..00000000000 --- a/cabal-testsuite/PackageTests/Regression/T6125/myprog.cabal +++ /dev/null @@ -1,9 +0,0 @@ -cabal-version: 2.4 -name: myprog -version: 0 -data-files: data/**/*.html - -executable myprog - build-depends: base - main-is: Main.hs - default-language: Haskell2010 diff --git a/cabal-testsuite/PackageTests/Regression/T6125/setup.cabal.out b/cabal-testsuite/PackageTests/Regression/T6125/setup.cabal.out deleted file mode 100644 index 64e8312ccdd..00000000000 --- a/cabal-testsuite/PackageTests/Regression/T6125/setup.cabal.out +++ /dev/null @@ -1,9 +0,0 @@ -# Setup configure -Resolving dependencies... -Configuring myprog-0... -# Setup build -Preprocessing executable 'myprog' for myprog-0.. -Building executable 'myprog' for myprog-0.. -# Setup copy -Installing executable myprog in -Warning: The directory /setup.cabal.dist/usr/bin is not in the system search path. diff --git a/cabal-testsuite/PackageTests/Regression/T6125/setup.out b/cabal-testsuite/PackageTests/Regression/T6125/setup.out deleted file mode 100644 index b982a76eccd..00000000000 --- a/cabal-testsuite/PackageTests/Regression/T6125/setup.out +++ /dev/null @@ -1,8 +0,0 @@ -# Setup configure -Configuring myprog-0... -# Setup build -Preprocessing executable 'myprog' for myprog-0.. -Building executable 'myprog' for myprog-0.. -# Setup copy -Installing executable myprog in -Warning: The directory /setup.dist/usr/bin is not in the system search path. diff --git a/cabal-testsuite/PackageTests/Regression/T6125/setup.test.hs b/cabal-testsuite/PackageTests/Regression/T6125/setup.test.hs deleted file mode 100644 index aeb2587e70c..00000000000 --- a/cabal-testsuite/PackageTests/Regression/T6125/setup.test.hs +++ /dev/null @@ -1,6 +0,0 @@ -import Test.Cabal.Prelude -main = setupAndCabalTest $ do - withPackageDb $ do - setup "configure" [] - setup "build" ["myprog"] - setup "copy" ["myprog"]