diff options
author | Ting-Wei Lan <lantw@src.gnome.org> | 2017-12-28 02:53:15 +0800 |
---|---|---|
committer | Ting-Wei Lan <lantw@src.gnome.org> | 2018-01-09 12:24:15 +0800 |
commit | f9788b2d1e56af14c81ce2e52aeacad931d87e2b (patch) | |
tree | a16ce6b0f2316504ec1a31beb4062caa55aa7c40 /giscanner | |
parent | ab71b25969404f615f44b509f4272ca83349590b (diff) | |
download | gobject-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
Diffstat (limited to 'giscanner')
-rw-r--r-- | giscanner/shlibs.py | 5 |
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: |