diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-12-25 16:42:00 -0500 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2023-02-19 02:55:55 +0530 |
commit | 678cd72793560d9dfa161ef76c65c493c901ac45 (patch) | |
tree | 2161c0c84ac1bbabe90ac01c8397852375c0cbc8 | |
parent | 05f85c79454e206e00c6ced5b6fc25ffcafed39c (diff) | |
download | meson-678cd72793560d9dfa161ef76c65c493c901ac45.zip meson-678cd72793560d9dfa161ef76c65c493c901ac45.tar.gz meson-678cd72793560d9dfa161ef76c65c493c901ac45.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
-rw-r--r-- | mesonbuild/dependencies/pkgconfig.py | 6 |
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 |