aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-08-08 00:12:06 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2018-08-24 03:19:08 +0530
commitb0c69696191cdc849acde3b7045808cb931a54b6 (patch)
tree88909eda7cb46f5b25e0cc81f5900159c57b9227
parent131e4d7422b99a7751c2337edbe313288498c4f8 (diff)
downloadmeson-b0c69696191cdc849acde3b7045808cb931a54b6.zip
meson-b0c69696191cdc849acde3b7045808cb931a54b6.tar.gz
meson-b0c69696191cdc849acde3b7045808cb931a54b6.tar.bz2
Don't check version for fallback not-found dependency
Otherwise we get an error while checking the subproject version: Uncomparable version string 'none'. If the dependency was found as a not-found dependency in the subproject and is not required, just take it.
-rw-r--r--mesonbuild/interpreter.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index 121b8f0..3aa3b23 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -2805,6 +2805,12 @@ external dependencies (including libraries) must go to "dependencies".''')
if not dep:
return False
found = dep.version_method([], {})
+ # Don't do a version check if the dependency is not found and not required
+ if found == 'none' and not required:
+ subproj_path = os.path.join(self.subproject_dir, dirname)
+ mlog.log('Dependency', mlog.bold(name), 'from subproject',
+ mlog.bold(subproj_path), 'found:', mlog.red('NO'), '(cached)')
+ return dep
if self.check_subproject_version(wanted, found):
subproj_path = os.path.join(self.subproject_dir, dirname)
mlog.log('Dependency', mlog.bold(name), 'from subproject',