summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTing-Wei Lan <lantw@src.gnome.org>2017-12-28 02:53:15 +0800
committerTing-Wei Lan <lantw@src.gnome.org>2018-01-09 12:24:15 +0800
commitf9788b2d1e56af14c81ce2e52aeacad931d87e2b (patch)
treea16ce6b0f2316504ec1a31beb4062caa55aa7c40
parentab71b25969404f615f44b509f4272ca83349590b (diff)
downloadgobject-introspection-f9788b2d1e56af14c81ce2e52aeacad931d87e2b.tar.gz
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
-rw-r--r--giscanner/shlibs.py5
1 files changed, 5 insertions, 0 deletions
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: