lutris: fix crash on musl

closes #39210
This commit is contained in:
classabbyamp 2022-09-11 02:41:52 -04:00
parent 102b2000ed
commit c694d7e333
No known key found for this signature in database
GPG Key ID: 6BE0755918A4C7F5
2 changed files with 24 additions and 1 deletions

View File

@ -0,0 +1,23 @@
upstreamed in https://github.com/lutris/lutris/pull/4496
--- a/lutris/util/system.py
+++ b/lutris/util/system.py
@@ -431,9 +431,15 @@
def get_locale_list():
"""Return list of available locales"""
- with subprocess.Popen(['locale', '-a'], stdout=subprocess.PIPE) as locale_getter:
- output = locale_getter.communicate()
- locales = output[0].decode('ASCII').split() # locale names use only ascii characters
+ try:
+ with subprocess.Popen(['locale', '-a'], stdout=subprocess.PIPE) as locale_getter:
+ output = locale_getter.communicate()
+ locales = output[0].decode('ASCII').split() # locale names use only ascii characters
+ except FileNotFoundError:
+ if lang := os.environ.get('LANG', ''):
+ locales = [lang]
+ else:
+ locales = []
return locales

View File

@ -1,7 +1,7 @@
# Template file for 'lutris'
pkgname=lutris
version=0.5.11
revision=1
revision=2
build_style=meson
hostmakedepends="gettext python3-setuptools python3-gobject gtk+3-devel"
depends="python3-dbus python3-gobject python3-yaml python3-evdev python3-Pillow