From 5e1fa146a608f7d380e068e599820874ef29435d Mon Sep 17 00:00:00 2001 From: Vasyl Vavrychuk Date: Sat, 11 Feb 2023 06:43:10 +0200 Subject: [PATCH] build: fix meson sandbox violation when using wayland-protocols as subproject When a dependency path is converted to string and dependency is a subproject, then accessing such file fails in meson with: ERROR: Sandbox violation: Tried to grab file ... from a nested subproject. Use '/' operator as documented in https://mesonbuild.com/Dependencies.html#dependencies-that-provide-resource-files Fixes: #715 Signed-off-by: Vasyl Vavrychuk --- protocol/meson.build | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/protocol/meson.build b/protocol/meson.build index 53ed2d47..2937a3d6 100644 --- a/protocol/meson.build +++ b/protocol/meson.build @@ -48,16 +48,16 @@ foreach proto: generated_protocols proto_name = proto[0] if proto[1] == 'internal' base_file = proto_name - xml_path = '@0@.xml'.format(proto_name) + xml_path = proto_name + '.xml' elif proto[1] == 'stable' base_file = proto_name - xml_path = '@0@/stable/@1@/@1@.xml'.format(dir_wp_base, base_file) + xml_path = dir_wp_base / 'stable' / base_file / (base_file + '.xml') elif proto[1] == 'unstable' base_file = '@0@-unstable-@1@'.format(proto_name, proto[2]) - xml_path = '@0@/unstable/@1@/@2@.xml'.format(dir_wp_base, proto_name, base_file) + xml_path = dir_wp_base / 'unstable' / proto_name / (base_file + '.xml') elif proto[1] == 'staging' base_file = '@0@-@1@'.format(proto_name, proto[2]) - xml_path = '@0@/staging/@1@/@2@.xml'.format(dir_wp_base, proto_name, base_file) + xml_path = dir_wp_base / 'staging' / proto_name / (base_file + '.xml') endif foreach output_type: [ 'client-header', 'server-header', 'private-code' ]