aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2021-11-28 12:30:44 -0500
committerEli Schwartz <eschwartz@archlinux.org>2021-12-20 16:03:43 -0500
commit71ae5ccb654cd38de8b33565f99ce18ce8c12210 (patch)
treec93311c137719ba522ccdc657ac4489c477bb9a1
parent3656b8c6d4ed8b3c0d42fb92caf90adc9247f24d (diff)
downloadmeson-71ae5ccb654cd38de8b33565f99ce18ce8c12210.zip
meson-71ae5ccb654cd38de8b33565f99ce18ce8c12210.tar.gz
meson-71ae5ccb654cd38de8b33565f99ce18ce8c12210.tar.bz2
restore the ability in the backend to silently find a program
Broken in commit f08eed37cb69ba0d793c0f1d086eaef7f25c2ea3 which moved the reporting and unconditionally added it.
-rw-r--r--mesonbuild/interpreter/interpreter.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py
index d4dbec9..f6aae4d 100644
--- a/mesonbuild/interpreter/interpreter.py
+++ b/mesonbuild/interpreter/interpreter.py
@@ -1445,7 +1445,8 @@ external dependencies (including libraries) must go to "dependencies".''')
progobj = self.notfound_program(args)
if isinstance(progobj, ExternalProgram) and not progobj.found():
- mlog.log('Program', mlog.bold(progobj.get_name()), 'found:', mlog.red('NO'))
+ if not silent:
+ mlog.log('Program', mlog.bold(progobj.get_name()), 'found:', mlog.red('NO'))
if required:
m = 'Program {!r} not found'
raise InterpreterException(m.format(progobj.get_name()))
@@ -1475,7 +1476,8 @@ external dependencies (including libraries) must go to "dependencies".''')
# Only store successful lookups
self.store_name_lookups(args)
- mlog.log('Program', mlog.bold(progobj.name), 'found:', mlog.green('YES'), *extra_info)
+ if not silent:
+ mlog.log('Program', mlog.bold(progobj.name), 'found:', mlog.green('YES'), *extra_info)
if isinstance(progobj, build.Executable):
progobj.was_returned_by_find_program = True
return progobj