From ccda5bc5bfeebd2f9665dafc444f1d9aa9edf3c7 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Wed, 31 Oct 2018 23:36:09 +0000 Subject: Cosmetic fix to failed required dependency reporting As mentioned in #4407, if dependency('boost') fails, the error message is 'Dependency "boost" not found, tried' (sic). Similar to line 1451 above, suppress reporting the tried methods returned by log_tried(), if the list is empty (as is the case with boost) --- mesonbuild/dependencies/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py index 805c5751c..7c7e7a2b7 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py @@ -1464,7 +1464,8 @@ def find_external_dependency(name, env, kwargs): # we have a list of failed ExternalDependency objects, so we can report # the methods we tried to find the dependency - raise DependencyException('Dependency "%s" not found, tried %s' % (name, tried)) + raise DependencyException('Dependency "%s" not found' % (name) + + (', tried %s' % (tried) if tried else '')) # return the last failed dependency object if pkgdep: -- cgit v1.2.3