[libvirt] [dbus PATCH] meson: fix construction of data directories
Andrea Bolognani
abologna at redhat.com
Tue Nov 12 11:07:22 UTC 2019
On Thu, 2019-10-24 at 15:54 +0200, Pavel Hrdina wrote:
> +prefix = get_option('prefix')
> +datadir = prefix / get_option('datadir')
> +sbindir = prefix / get_option('sbindir')
> +
> +opt_dirs = [
> + 'dbus_interfaces',
> + 'dbus_services',
> + 'dbus_system_services',
> + 'dbus_system_policies',
> + 'polkit_rules',
> +]
> +
> +foreach opt_dir : opt_dirs
> + value = get_option(opt_dir)
> + varname = '@0 at _dir'.format(opt_dir)
> + set_variable(varname, datadir / value)
> +endforeach
Quoting the documentation[1]:
If any one of the individual segments is an absolute path,
all segments before it are dropped. That means that
join_paths('foo', '/bar') returns /bar.
Wow, that is some magic going on right there! Not sure whether I
like it, but it's not my decision to make anyway :)
The patch itself is correct, so
Reviewed-by: Andrea Bolognani <abologna at redhat.com>
[1] https://mesonbuild.com/Reference-manual.html#join_paths
--
Andrea Bolognani / Red Hat / Virtualization
More information about the libvir-list
mailing list