From f9788b2d1e56af14c81ce2e52aeacad931d87e2b Mon Sep 17 00:00:00 2001 From: Ting-Wei Lan Date: Thu, 28 Dec 2017 02:53:15 +0800 Subject: giscanner: Fix shared library name finding on *BSD ldd commands on *BSD always print the name of the input file regardless of the number of arguments, so we have to ignore this line to avoid matching it with _ldd_library_pattern. https://bugzilla.gnome.org/show_bug.cgi?id=791991 --- giscanner/shlibs.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py index c93d20cf..4e459571 100644 --- a/giscanner/shlibs.py +++ b/giscanner/shlibs.py @@ -117,6 +117,11 @@ def _resolve_non_libtool(options, binary, libraries): shlibs = [] for line in proc.stdout: line = line.decode('ascii') + # ldd on *BSD show the argument passed on the first line even if + # there is only one argument. We have to ignore it because it is + # possible for the name of the binary to match _ldd_library_pattern. + if line == binary.args[0] + ':\n': + continue for library, pattern in patterns.items(): m = pattern.search(line) if m: -- cgit v1.2.1