aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/pkgconfig.py
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-12-25 16:42:00 -0500
committerEli Schwartz <eschwartz@archlinux.org>2022-12-25 16:42:00 -0500
commit891b4ffe3372c840322f5586430dcba34acf6d53 (patch)
treebf8857cfef578e923c7e8532982a1a0e41f14f85 /mesonbuild/dependencies/pkgconfig.py
parent2fd5bd934e0e6dd26ad8c326a156a710f912b335 (diff)
downloadmeson-891b4ffe3372c840322f5586430dcba34acf6d53.zip
meson-891b4ffe3372c840322f5586430dcba34acf6d53.tar.gz
meson-891b4ffe3372c840322f5586430dcba34acf6d53.tar.bz2
dependencies: better logging of pkg-config call outputs
If `pkg-config --modversion foobar` fails, we don't know why. The general issue here, though, is that call_pkgbin routinely logs stdout for informational purposes, but not stderr. Fixes #11076
Diffstat (limited to 'mesonbuild/dependencies/pkgconfig.py')
-rw-r--r--mesonbuild/dependencies/pkgconfig.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/pkgconfig.py b/mesonbuild/dependencies/pkgconfig.py
index 231ec51..76dc3ef 100644
--- a/mesonbuild/dependencies/pkgconfig.py
+++ b/mesonbuild/dependencies/pkgconfig.py
@@ -124,7 +124,11 @@ class PkgConfigDependency(ExternalDependency):
p, out, err = Popen_safe(cmd, env=env)
rc, out, err = p.returncode, out.strip(), err.strip()
call = ' '.join(cmd)
- mlog.debug(f"Called `{call}` -> {rc}\n{out}")
+ mlog.debug(f"Called `{call}` -> {rc}")
+ if out:
+ mlog.debug(f'stdout:\n{out}\n-----------')
+ if err:
+ mlog.debug(f'stderr:\n{err}\n-----------')
return rc, out, err
@staticmethod