aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2018-10-31 23:36:09 +0000
committerJussi Pakkanen <jpakkane@gmail.com>2018-11-02 23:06:42 +0200
commitccda5bc5bfeebd2f9665dafc444f1d9aa9edf3c7 (patch)
treef1fb1132cabc1f2d2ec9ef03314d4da3e9d6ef43 /mesonbuild
parent5af84440bcfb3fd5ab8f2791b5e6a57fabfcbc19 (diff)
downloadmeson-ccda5bc5bfeebd2f9665dafc444f1d9aa9edf3c7.zip
meson-ccda5bc5bfeebd2f9665dafc444f1d9aa9edf3c7.tar.gz
meson-ccda5bc5bfeebd2f9665dafc444f1d9aa9edf3c7.tar.bz2
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)
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/dependencies/base.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index 805c575..7c7e7a2 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: