From be872e193e359ade5da6e77156e40880d88ee1d5 Mon Sep 17 00:00:00 2001 From: Yegor Yefremov Date: Sat, 17 Feb 2024 14:29:06 +0100 Subject: [PATCH] build: specify run_command semantics "check" argument will change its default value to "true" in the future versions. Hence, set it explicitly to "false", to preserve current semantics. Fixes the following warning: WARNING: You should add the boolean check kwarg to the run_command call. It currently defaults to false, but it will default to true in future releases of meson. See also: https://github.com/mesonbuild/meson/issues/9300 --- meson.build | 6 +++--- src/libnm-client-impl/meson.build | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index b9e4ee2f01..c6b2c0decb 100644 --- a/meson.build +++ b/meson.build @@ -254,7 +254,7 @@ config_h.set10('WITH_JANSSON', jansson_dep.found()) jansson_msg = 'no' if jansson_dep.found() jansson_libdir = jansson_dep.get_pkgconfig_variable('libdir') - res = run_command(find_program('eu-readelf', 'readelf'), '-d', join_paths(jansson_libdir, 'libjansson.so')) + res = run_command(find_program('eu-readelf', 'readelf'), '-d', join_paths(jansson_libdir, 'libjansson.so'), check: false) jansson_soname = '' foreach line: res.stdout().split('\n') if line.strip().contains('SONAME') @@ -296,7 +296,7 @@ config_h.set_quoted('NM_CONFIG_DEFAULT_MAIN_MIGRATE_IFCFG_RH', config_migrate_if enable_ifupdown = get_option('ifupdown') if enable_ifupdown == 'auto' - enable_ifupdown = (run_command('test', '-e', '/etc/debian_version').returncode() == 0) + enable_ifupdown = (run_command('test', '-e', '/etc/debian_version', check: false).returncode() == 0) else enable_ifupdown = (enable_ifupdown != 'false') endif @@ -514,7 +514,7 @@ polkit_agent_helper_1_path = get_option('polkit_agent_helper_1') foreach p : [ '/usr/libexec/polkit-agent-helper-1', '/usr/lib/polkit-1/polkit-agent-helper-1', '/usr/lib/policykit-1/polkit-agent-helper-1' ] - if polkit_agent_helper_1_path == '' and run_command('test', '-f', p).returncode() == 0 + if polkit_agent_helper_1_path == '' and run_command('test', '-f', p, check: false).returncode() == 0 polkit_agent_helper_1_path = p endif endforeach diff --git a/src/libnm-client-impl/meson.build b/src/libnm-client-impl/meson.build index 79ac95598a..1a70c67dde 100644 --- a/src/libnm-client-impl/meson.build +++ b/src/libnm-client-impl/meson.build @@ -166,13 +166,13 @@ if enable_introspection install: true, ) - gi_typelib_path = run_command('printenv', 'GI_TYPELIB_PATH').stdout() + gi_typelib_path = run_command('printenv', 'GI_TYPELIB_PATH', check: false).stdout() if gi_typelib_path != '' gi_typelib_path = ':' + gi_typelib_path endif gi_typelib_path = meson.current_build_dir() + gi_typelib_path - ld_library_path = run_command('printenv', 'LD_LIBRARY_PATH').stdout() + ld_library_path = run_command('printenv', 'LD_LIBRARY_PATH', check: false).stdout() if ld_library_path != '' ld_library_path = ':' + ld_library_path endif