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)
pull/4394/merge
Jon Turney 6 years ago committed by Jussi Pakkanen
parent 5af84440bc
commit ccda5bc5bf
  1. 3
      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 # we have a list of failed ExternalDependency objects, so we can report
# the methods we tried to find the dependency # 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 # return the last failed dependency object
if pkgdep: if pkgdep:

Loading…
Cancel
Save