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
This commit is contained in:
Eli Schwartz 2022-12-25 16:42:00 -05:00
parent 2fd5bd934e
commit 891b4ffe33
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
1 changed files with 5 additions and 1 deletions

View File

@ -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