Skip to content

Commit

Permalink
Bindepend: Skip/warn unrecognised output from ldconfig (pyinstaller#5540
Browse files Browse the repository at this point in the history
). [skip-ci]

ldconfig has started adding additional lines of output such as:

    Cache generated by: ldconfig (GNU libc) release release version 2.33

which caused regex parse errors. This particular line is now whitelisted
as skipable. And any future unrecognised patterns will now issue
warnings.
  • Loading branch information
bwoodsend committed Feb 10, 2021
1 parent c117eba commit 5898191
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions PyInstaller/depend/utils.py
Expand Up @@ -399,6 +399,18 @@ def load_ldconfig_cache():
for line in text:
# :fixme: this assumes libary names do not contain whitespace
m = pattern.match(line)

# Sanitize away any abnormal lines of output.
if m is None:
# Warn about it then skip the rest of this iteration.
if re.search("Cache generated by:", line):
# See #5540. This particular line is harmless.
pass
else:
logger.warning(
"Unrecognised line of output %r from ldconfig", line)
continue

path = m.groups()[-1]
if is_freebsd or is_openbsd:
# Insert `.so` at the end of the lib's basename. soname
Expand Down
3 changes: 3 additions & 0 deletions news/5540.bugfix.rst
@@ -0,0 +1,3 @@
Linux: Fix binary dependency scanner to support `changes to ldconfig
<https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=dfb3f101c5ef23adf60d389058a2b33e23303d04>`_
introduced in ``glibc`` 2.33.

0 comments on commit 5898191

Please sign in to comment.