summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Karamazov <deserter666@danwin1210.me>2021-04-06 20:15:44 +0530
committerDimitri Karamazov <deserter666@danwin1210.me>2021-04-06 20:15:44 +0530
commit5c612c6e869b1c865c948acbc2fdebf9cb669e18 (patch)
treee90b1ef05b9bbfb2f5e28fe5ec61b30451f5def9
parent98da67632cc014e64a2f6a4ae6b5d7ca4fd21ac0 (diff)
downloadqutebrowser-5c612c6e869b1c865c948acbc2fdebf9cb669e18.tar.gz
qutebrowser-5c612c6e869b1c865c948acbc2fdebf9cb669e18.zip
Pull the highest version of libQtWebEngineCore.so
-rw-r--r--qutebrowser/misc/elf.py17
1 files changed, 3 insertions, 14 deletions
diff --git a/qutebrowser/misc/elf.py b/qutebrowser/misc/elf.py
index 3bfd111fa..1d26df85f 100644
--- a/qutebrowser/misc/elf.py
+++ b/qutebrowser/misc/elf.py
@@ -316,20 +316,9 @@ def parse_webenginecore() -> Optional[Versions]:
else:
library_path = pathlib.Path(QLibraryInfo.location(QLibraryInfo.LibrariesPath))
- filenames = [
- # PyQt bundles those files with a .5 suffix, and Linux distributions
- # most likely symlinks that.
- 'libQt5WebEngineCore.so.5',
- # OpenBSD
- 'libQt5WebEngineCore.so.1.0',
- ]
- for filename in filenames:
- lib_file = library_path / filename
- if lib_file.exists():
- log.misc.debug(f"QtWebEngine .so found at {lib_file}")
- break
- else:
- log.misc.debug(f"No QtWebEngine .so found in {library_path}")
+ library_name = sorted(list(pathlib.Path(library_path).glob('libQt5WebEngineCore.so*')))
+ lib_file = library_path / library_name[-1].as_posix()
+ if not lib_file.exists():
return None
try: