diff --git a/PyInstaller/depend/utils.py b/PyInstaller/depend/utils.py index 4776676b7f..2000b3f554 100644 --- a/PyInstaller/depend/utils.py +++ b/PyInstaller/depend/utils.py @@ -372,6 +372,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: # Insert `.so` at the end of the lib's basename. soname diff --git a/news/5540.bugfix.rst b/news/5540.bugfix.rst new file mode 100644 index 0000000000..863ddb9736 --- /dev/null +++ b/news/5540.bugfix.rst @@ -0,0 +1,3 @@ +Linux: Fix binary dependency scanner to support `changes to ldconfig +`_ +introduced in ``glibc`` 2.33.