Apply local configuration to install targets
The target of `cabal install` is not considered to be a local package, which means local configuration (e.g. in cabal.project, or flags like --enable-profiling) does not apply to it. In 76670ebd, we changed the behaviour to applying the local flags to cabal install targets, but it used the literal target string as a package name to which the flags were additionally applied. However, `cabal install` targets are NOT necessarily package names, so, e.g., if we did `cabal install exe:mycomp`, the local flags would not apply since "exe:mycomp" is not a recognized /package/. The solution is to parse the target selectors first, and apply the local flags to the package of the resolved targets. Fixes #7297, #8909, the install part of #7236, #8529, #7832
Showing
- cabal-install/src/Distribution/Client/CmdInstall.hs 35 additions, 9 deletionscabal-install/src/Distribution/Client/CmdInstall.hs
- cabal-testsuite/PackageTests/Install/T7297-8909-7236/Main.hs 25 additions, 0 deletionscabal-testsuite/PackageTests/Install/T7297-8909-7236/Main.hs
- cabal-testsuite/PackageTests/Install/T7297-8909-7236/cabal.project 1 addition, 0 deletions...tsuite/PackageTests/Install/T7297-8909-7236/cabal.project
- cabal-testsuite/PackageTests/Install/T7297-8909-7236/cabal.test.hs 22 additions, 0 deletions...tsuite/PackageTests/Install/T7297-8909-7236/cabal.test.hs
- cabal-testsuite/PackageTests/Install/T7297-8909-7236/t7297-89097236a.cabal 8 additions, 0 deletions...ackageTests/Install/T7297-8909-7236/t7297-89097236a.cabal
Loading