From: Daan De Meyer Date: Fri, 11 Apr 2025 10:12:12 +0000 (+0200) Subject: test: Work around bug in meson when installing directory symlinks X-Git-Tag: v258-rc1~843^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fc4f9c5f8b95f00c04b2d1f7827d0ecefade9458;p=thirdparty%2Fsystemd.git test: Work around bug in meson when installing directory symlinks Installing symlinks pointing to directories with install_subdir() is broken (see https://github.com/mesonbuild/meson/pull/14471). Let's work around the issue for now by manually installing the standalone directory until the issue is fixed upstream and available in meson in all supported distributions. --- diff --git a/test/meson.build b/test/meson.build index e3f78b30046..9149ca1e1e8 100644 --- a/test/meson.build +++ b/test/meson.build @@ -291,9 +291,20 @@ if install_tests endif if meson.version().version_compare('>=1.3.0') + # Installing symlinks to directories is broken in install_subdir() so we exclude the + # standalone directory from install_subdir() and handle it manually. + # TODO: Remove when https://github.com/mesonbuild/meson/pull/14471 is available in all + # supported distributions. install_subdir('integration-tests', install_dir : testsdir, + exclude_directories : ['standalone'], follow_symlinks : false) + install_emptydir(testsdir / 'integration-tests/standalone') + install_data('integration-tests/standalone/meson.build', + install_dir : testsdir / 'integration-tests/standalone') + install_symlink('integration-tests', + pointing_to : '..', + install_dir : testsdir / 'integration-tests/standalone') else meson.add_install_script(sh, '-c', rsync_r.format(meson.current_source_dir() / 'integration-tests', testsdir))