]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: invert version check condition to magically suppress warning
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 5 Mar 2025 12:39:06 +0000 (21:39 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 9 Mar 2025 17:41:40 +0000 (02:41 +0900)
Then, it works with --fatal-meson-warnings.

test/meson.build

index 18b747ffbf3d5c31cebec56bac6ca7d3776cb01c..7e9d28aa1bb8f2ebc22ebaa294461d1882a42ed2 100644 (file)
@@ -474,7 +474,12 @@ if install_tests
         foreach subdir : testdata_subdirs
                 # install_subdir() before meson 1.3.0 does not handle symlinks correctly (it follows them
                 # instead of copying the symlink) so we use rsync instead.
-                if meson.version().version_compare('<1.3.0')
+                if meson.version().version_compare('>=1.3.0')
+                        install_subdir(subdir,
+                                       exclude_files : ['.gitattributes'],
+                                       install_dir : testdata_dir,
+                                       follow_symlinks : false)
+                else
                         if not rsync.found()
                                 error('rsync is required to install the integration test data')
                         endif
@@ -482,11 +487,6 @@ if install_tests
                         rsync_r = rsync.full_path() + ' -rlpt --exclude .gitattributes -- "@0@" "${DESTDIR:-}@1@"'
                         meson.add_install_script(sh, '-c',
                                                  rsync_r.format(meson.current_source_dir() / subdir, testdata_dir))
-                else
-                        install_subdir(subdir,
-                                       exclude_files : ['.gitattributes'],
-                                       install_dir : testdata_dir,
-                                       follow_symlinks : false)
                 endif
         endforeach