meson: Replace external_program.path() with external_program.full_path()

The path() method is deprecated in 0.55.0 and we're recommended
to use full_path() instead. Interestingly, we were already doing
do in couple of places, but not all of them.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Michal Privoznik 2022-10-07 09:43:33 +02:00
parent 3395c35f2f
commit 27df3522e6
7 changed files with 41 additions and 41 deletions

View File

@ -1,6 +1,6 @@
flake8_path = ''
if flake8_prog.found()
flake8_path = flake8_prog.path()
flake8_path = flake8_prog.full_path()
endif
if host_machine.system() == 'freebsd' or host_machine.system() == 'darwin'
@ -33,10 +33,10 @@ syntax_check_conf = configuration_data({
'top_builddir': meson.project_build_root(),
'flake8_path': flake8_path,
'runutf8': ' '.join(runutf8),
'PYTHON3': python3_prog.path(),
'GREP': grep_prog.path(),
'SED': sed_prog.path(),
'AWK': awk_prog.path(),
'PYTHON3': python3_prog.full_path(),
'GREP': grep_prog.full_path(),
'SED': sed_prog.full_path(),
'AWK': awk_prog.full_path(),
})
configure_file(

View File

@ -129,7 +129,7 @@ aclperms_gen = custom_target(
)
docs_timestamp = run_command(
python3_prog, meson_timestamp_prog.path(), env: runutf8, check: true,
python3_prog, meson_timestamp_prog.full_path(), env: runutf8, check: true,
).stdout().strip()
site_xsl = files('site.xsl')
@ -175,7 +175,7 @@ docs_programs_groups = [
foreach item : docs_programs_groups
prog = find_program(item.get('prog'), dirs: libvirt_sbin_path)
varname = item.get('name').underscorify()
conf.set_quoted(varname.to_upper(), prog.path())
conf.set_quoted(varname.to_upper(), prog.full_path())
set_variable('@0@_prog'.format(varname), prog)
endforeach
@ -348,7 +348,7 @@ endforeach
run_target(
'install-web',
command: [
meson_python_prog, python3_prog.path(), meson_install_web_prog.path(),
meson_python_prog, python3_prog.full_path(), meson_install_web_prog.full_path(),
install_web_files,
],
depends: install_web_deps,
@ -358,7 +358,7 @@ test(
'check-html-references',
python3_prog,
args: [
check_html_references_prog.path(),
check_html_references_prog.full_path(),
'--prefix',
meson.project_build_root() / 'docs'
],

View File

@ -798,14 +798,14 @@ endif
foreach name : required_programs
prog = find_program(name, dirs: libvirt_sbin_path)
varname = name.underscorify()
conf.set_quoted(varname.to_upper(), prog.path())
conf.set_quoted(varname.to_upper(), prog.full_path())
set_variable('@0@_prog'.format(varname), prog)
endforeach
foreach item : required_programs_groups
prog = find_program(item.get('prog'), dirs: libvirt_sbin_path)
varname = item.get('name').underscorify()
conf.set_quoted(varname.to_upper(), prog.path())
conf.set_quoted(varname.to_upper(), prog.full_path())
set_variable('@0@_prog'.format(varname), prog)
endforeach
@ -835,7 +835,7 @@ foreach name : optional_programs
prog = find_program(name, required: false, dirs: libvirt_sbin_path)
varname = name.underscorify()
if prog.found()
prog_path = prog.path()
prog_path = prog.full_path()
else
prog_path = name
endif
@ -1446,9 +1446,9 @@ if not get_option('driver_bhyve').disabled() and host_machine.system() == 'freeb
if bhyve_prog.found() and bhyvectl_prog.found() and bhyveload_prog.found()
conf.set('WITH_BHYVE', 1)
conf.set_quoted('BHYVE', bhyve_prog.path())
conf.set_quoted('BHYVECTL', bhyvectl_prog.path())
conf.set_quoted('BHYVELOAD', bhyveload_prog.path())
conf.set_quoted('BHYVE', bhyve_prog.full_path())
conf.set_quoted('BHYVECTL', bhyvectl_prog.full_path())
conf.set_quoted('BHYVELOAD', bhyveload_prog.full_path())
endif
elif get_option('driver_bhyve').enabled()
error('The bhyve driver cannot be enabled')
@ -1690,7 +1690,7 @@ if not get_option('driver_qemu').disabled()
required: false
)
if qemu_bridge_prog.found()
qemu_bridge_path = qemu_bridge_prog.path()
qemu_bridge_path = qemu_bridge_prog.full_path()
else
qemu_bridge_path = '/usr/libexec/qemu-bridge-helper'
endif
@ -1702,7 +1702,7 @@ if not get_option('driver_qemu').disabled()
required: false
)
if qemu_pr_prog.found()
qemu_pr_path = qemu_pr_prog.path()
qemu_pr_path = qemu_pr_prog.full_path()
else
qemu_pr_path = '/usr/bin/qemu-pr-helper'
endif
@ -1714,7 +1714,7 @@ if not get_option('driver_qemu').disabled()
required: false
)
if qemu_slirp_prog.found()
qemu_slirp_path = qemu_slirp_prog.path()
qemu_slirp_path = qemu_slirp_prog.full_path()
else
qemu_slirp_path = '/usr/bin/slirp-helper'
endif
@ -1726,7 +1726,7 @@ if not get_option('driver_qemu').disabled()
required: false
)
if qemu_dbus_daemon_prog.found()
qemu_dbus_daemon_path = qemu_dbus_daemon_prog.path()
qemu_dbus_daemon_path = qemu_dbus_daemon_prog.full_path()
else
qemu_dbus_daemon_path = '/usr/bin/dbus-daemon'
endif
@ -1822,14 +1822,14 @@ if conf.has('WITH_LIBVIRTD')
use_storage = true
conf.set('WITH_STORAGE_FS', 1)
conf.set_quoted('MOUNT', mount_prog.path())
conf.set_quoted('UMOUNT', umount_prog.path())
conf.set_quoted('MKFS', mkfs_prog.path())
conf.set_quoted('MOUNT', mount_prog.full_path())
conf.set_quoted('UMOUNT', umount_prog.full_path())
conf.set_quoted('MKFS', mkfs_prog.full_path())
showmount_prog = find_program('showmount', required: false, dirs: libvirt_sbin_path)
showmount_path = ''
if showmount_prog.found()
showmount_path = showmount_prog.path()
showmount_path = showmount_prog.full_path()
endif
conf.set_quoted('SHOWMOUNT', showmount_path)
endif
@ -1879,7 +1879,7 @@ if conf.has('WITH_LIBVIRTD')
conf.set('WITH_STORAGE_LVM', 1)
foreach name : lvm_progs
conf.set_quoted(name.to_upper(), get_variable('@0@_prog'.format(name)).path())
conf.set_quoted(name.to_upper(), get_variable('@0@_prog'.format(name)).full_path())
endforeach
endif
endif
@ -2033,7 +2033,7 @@ if not get_option('numad').disabled() and numactl_dep.found()
numad_prog = find_program('numad', required: get_option('numad'), dirs: libvirt_sbin_path)
if numad_prog.found()
conf.set('WITH_NUMAD', 1)
conf.set_quoted('NUMAD', numad_prog.path())
conf.set_quoted('NUMAD', numad_prog.full_path())
endif
elif get_option('numad').enabled()
error('You must have numactl enabled for numad support.')
@ -2148,7 +2148,7 @@ if git
configuration: spec_conf,
)
authors = run_command(python3_prog, meson_gen_authors_prog.path(),
authors = run_command(python3_prog, meson_gen_authors_prog.full_path(),
env: runutf8, check: true)
authors_file = 'AUTHORS.rst.in'
@ -2170,7 +2170,7 @@ if git
foreach file : dist_files
meson.add_dist_script(
meson_python_prog.path(), python3_prog.path(), meson_dist_prog.path(),
meson_python_prog.full_path(), python3_prog.full_path(), meson_dist_prog.full_path(),
meson.project_build_root(), file
)
endforeach

View File

@ -120,6 +120,6 @@ generated_sym_files += access_gen_sym
test(
'check-aclperms',
python3_prog,
args: [ check_aclperms_prog.path(), access_perm_h, files('viraccessperm.c') ],
args: [ check_aclperms_prog.full_path(), access_perm_h, files('viraccessperm.c') ],
env: runutf8,
)

View File

@ -909,7 +909,7 @@ virt_install_dirs += [
]
meson.add_install_script(
meson_python_prog.path(), python3_prog.path(), meson_install_dirs_prog.path(),
meson_python_prog.full_path(), python3_prog.full_path(), meson_install_dirs_prog.full_path(),
virt_install_dirs,
)
@ -920,7 +920,7 @@ if host_machine.system() == 'linux'
test(
'check-symfile',
python3_prog,
args: [ check_symfile_prog.path(), libvirt_syms, libvirt_lib ],
args: [ check_symfile_prog.full_path(), libvirt_syms, libvirt_lib ],
env: runutf8,
)
@ -928,7 +928,7 @@ if host_machine.system() == 'linux'
test(
'check-admin-symfile',
python3_prog,
args: [ check_symfile_prog.path(), libvirt_admin_syms, libvirt_admin_lib ],
args: [ check_symfile_prog.full_path(), libvirt_admin_syms, libvirt_admin_lib ],
env: runutf8,
)
endif
@ -938,7 +938,7 @@ test(
'check-symsorting',
python3_prog,
args: [
check_symsorting_prog.path(),
check_symsorting_prog.full_path(),
meson.current_source_dir(),
files(sym_files, used_sym_files),
],
@ -949,7 +949,7 @@ test(
'check-admin-symsorting',
python3_prog,
args: [
check_symsorting_prog.path(),
check_symsorting_prog.full_path(),
meson.current_source_dir(),
libvirt_admin_private_syms,
],
@ -960,7 +960,7 @@ test(
'check-drivername',
python3_prog,
args: [
check_drivername_prog.path(), files(driver_headers),
check_drivername_prog.full_path(), files(driver_headers),
files('libvirt_public.syms'), libvirt_qemu_syms, libvirt_lxc_syms,
],
env: runutf8,
@ -970,7 +970,7 @@ test(
'check-admin-drivername',
python3_prog,
args: [
check_drivername_prog.path(), libvirt_admin_public_syms,
check_drivername_prog.full_path(), libvirt_admin_public_syms,
],
env: runutf8,
)
@ -978,14 +978,14 @@ test(
test(
'check-driverimpls',
python3_prog,
args: [ check_driverimpls_prog.path(), driver_source_files ],
args: [ check_driverimpls_prog.full_path(), driver_source_files ],
env: runutf8,
)
test(
'check-aclrules',
python3_prog,
args: [ check_aclrules_prog.path(), files('remote/remote_protocol.x'), stateful_driver_source_files ],
args: [ check_aclrules_prog.full_path(), files('remote/remote_protocol.x'), stateful_driver_source_files ],
env: runutf8,
)
@ -1010,11 +1010,11 @@ if pdwtags_prog.found() and cc.get_id() != 'clang'
'check-@0@'.format(proto['name']),
python3_prog,
args: [
check_remote_protocol_prog.path(),
check_remote_protocol_prog.full_path(),
proto['name'],
lib.name(),
lib.full_path(),
pdwtags_prog.path(),
pdwtags_prog.full_path(),
files('@0@-structs'.format(proto['name'])),
],
env: runutf8,

View File

@ -90,7 +90,7 @@ if conf.has('WITH_NETWORK')
)
meson.add_install_script(
meson_python_prog.path(), python3_prog.path(), meson_install_symlink_prog.path(),
meson_python_prog.full_path(), python3_prog.full_path(), meson_install_symlink_prog.full_path(),
confdir / 'qemu' / 'networks' / 'autostart',
'../default.xml', 'default.xml',
)

View File

@ -700,7 +700,7 @@ testenv += 'VIR_TEST_FILE_ACCESS=1'
add_test_setup(
'access',
env: testenv,
exe_wrapper: [ python3_prog, check_file_access_prog.path() ],
exe_wrapper: [ python3_prog, check_file_access_prog.full_path() ],
)
add_test_setup(