aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2021-03-24 17:53:10 +0200
committerGitHub <noreply@github.com>2021-03-24 17:53:10 +0200
commit9b27d110d1e9dac576e459f222bcfa87027d2d99 (patch)
tree0a8ed554bd4a5cd547184069fe20055e57913dec /mesonbuild/interpreter.py
parent01c6b50a77357ba19c1023eb40f54263b5b91ee8 (diff)
parent37d4c86e5b570097b1600148fb872bce27d98f32 (diff)
downloadmeson-9b27d110d1e9dac576e459f222bcfa87027d2d99.zip
meson-9b27d110d1e9dac576e459f222bcfa87027d2d99.tar.gz
meson-9b27d110d1e9dac576e459f222bcfa87027d2d99.tar.bz2
Merge pull request #8571 from xclaesse/spurious-warning
Fix spurious sandbox violation warning
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r--mesonbuild/interpreter.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index dbc655f..c27a4e7 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -4601,7 +4601,7 @@ different subdirectory.
''')
else:
try:
- self.validate_within_subproject(a, '')
+ self.validate_within_subproject(self.subdir, a)
except InterpreterException:
mlog.warning('include_directories sandbox violation!')
print(f'''The project is trying to access the directory {a} which belongs to a different
@@ -4830,6 +4830,8 @@ Try setting b_lundef to false instead.'''.format(self.coredata.options[OptionKey
# /opt/vendorsdk/src/file_with_license_restrictions.c
return
project_root = Path(srcdir, self.root_subdir)
+ if norm == project_root:
+ return
if project_root not in norm.parents:
raise InterpreterException(f'Sandbox violation: Tried to grab {inputtype} {norm.name} outside current (sub)project.')
if project_root / self.subproject_dir in norm.parents: