pgsql: meson: Avoid PATH bloat from NLS .mo targets in tmp_install test

Started by Andrew Dunstan21 days ago1 messagescommitters
Jump to latest
#1Andrew Dunstan
andrew@dunslane.net

meson: Avoid PATH bloat from NLS .mo targets in tmp_install test

On Windows, meson adds the build directory of every target in a test's
'depends:' to that test's PATH. tmp_install depended on
installed_targets, which with NLS enabled includes several hundred .mo
targets, pushing PATH past the Windows length limit. tmp_install and
initdb_cache then failed with no output.

Fix by depending on a stamp custom_target that itself depends on
installed_targets. Meson doesn't walk a custom_target's dependencies
when building the test PATH, so this adds at most one entry. This can
be removed once we mandate a meson version containing the upstream fix
(expected in 1.13).

Reviewed-by: Tristan Partin <tristan@partin.io>
Backpatch-through: 16
Discussion: /messages/by-id/CAD5tBcJXAX8bz5q9ngE4znvVLiXaPO89D0yTFhJgEPrPyT-Erw@mail.gmail.com

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ab5a39e1672e28b59e7699b6d8f461ef9f4b3874

Modified Files
--------------
meson.build | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)