From eadca68df52f0fd7db2035c7dad3bb87240ecf34 Mon Sep 17 00:00:00 2001 From: Sparky Bluefang Date: Sat, 6 Jul 2024 04:43:53 -0400 Subject: [PATCH] Simplify 64bit path handling. More than x86_64 uses /usr/lib64 (i.e. arm64/aarch64). One additional path check is probably not worth enumerating all of the applicable machine names. --- files/usr/share/cinnamon/cinnamon-settings/bin/capi.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/files/usr/share/cinnamon/cinnamon-settings/bin/capi.py b/files/usr/share/cinnamon/cinnamon-settings/bin/capi.py index 05d88dea20..77621a98a8 100644 --- a/files/usr/share/cinnamon/cinnamon-settings/bin/capi.py +++ b/files/usr/share/cinnamon/cinnamon-settings/bin/capi.py @@ -27,20 +27,18 @@ def __init__(self): self.extension_point = Gio.io_extension_point_register ("cinnamon-control-center-1") self.modules = [] - architecture = platform.machine() # get the arch-specific triplet, e.g. 'x86_64-linux-gnu' or 'arm-linux-gnueabihf' # see also: https://wiki.debian.org/Python/MultiArch triplet = sysconfig.get_config_var('MULTIARCH') - paths = ["/usr/lib", f"/usr/lib/{triplet}"] + paths = ["/usr/lib", "/usr/lib64", f"/usr/lib/{triplet}"] # On x86 archs, iterate through multiple paths # For instance, on a Mint i686 box, the path is actually /usr/lib/i386-linux-gnu + architecture = platform.machine() x86archs = ["i386", "i486", "i586", "i686"] if architecture in x86archs: for arch in x86archs: paths += ["/usr/lib/%s" % arch] - elif architecture == "x86_64": - paths += ["/usr/lib/x86_64", "/usr/lib64"] else: paths += ["/usr/lib/%s" % architecture]