Commit a89dd4e
Append paths in global config to progdb in configureCompiler v2 (#10826)
* Append paths in global config to progdb in `configureCompiler`
* Add test to check global extra-prog-path is used in `configureCompiler`
We add a new PackageTest for cabal-install, which makes sure that the
extra-prog-path in the global config is used when resolving pkg-config
instead of anything already on PATH. We do this by specifying a "bad"
pkg-config to extra-prog-path that returns exit code 1.
On Windows, Cabal logs are identical in the following two cases:
- the override didn't work, and pkg-config was not found on the system
- the override did work, and querying it failed (expectedly)
To work around this, we add a "good" pkg-config script to PATH before-
hand, so that cabal succeeds in the first case and the logs differ.
This test is a stripped down reproduction of what happens when a user on
Windows adds MSYS2 paths to extra-prog-path but not the system PATH.
This is a reasonable setup (often, adding MSYS2 to system PATH is not
good practice), and is even created automatically by GHCup.
* Refactor `configureCompiler` path addition for cleaner variable names
* Remove unnecessary build target from ExtraProgPathGlobal test command
* Fix ExtraProgPathGlobal test failing on Mac/Unix for missing +x perms
* Rename pr-10790 changelog to pr-10826 as it superceded
* Add hashtag before PR/issue numbers in changelog for 10826
---------
Co-authored-by: Javier Sagredo <[email protected]>
(cherry picked from commit 74601f4)1 parent a8cf469 commit a89dd4e
File tree
13 files changed
+174
-7
lines changed- cabal-install/src/Distribution/Client
- cabal-testsuite/PackageTests/ExtraProgPathGlobal
- scripts-winpath
- scripts
- changelog.d
13 files changed
+174
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
470 | 470 | | |
471 | 471 | | |
472 | 472 | | |
| 473 | + | |
473 | 474 | | |
474 | 475 | | |
475 | 476 | | |
| |||
493 | 494 | | |
494 | 495 | | |
495 | 496 | | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
500 | 505 | | |
501 | 506 | | |
502 | 507 | | |
503 | 508 | | |
504 | 509 | | |
505 | | - | |
| 510 | + | |
506 | 511 | | |
507 | | - | |
508 | 512 | | |
509 | 513 | | |
510 | 514 | | |
511 | 515 | | |
512 | 516 | | |
513 | 517 | | |
514 | | - | |
| 518 | + | |
515 | 519 | | |
516 | 520 | | |
517 | 521 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
Lines changed: 49 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
Binary file not shown.
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Binary file not shown.
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
0 commit comments