Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify 64bit path handling in cinnamon-settings #12278

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions files/usr/share/cinnamon/cinnamon-settings/bin/capi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Comment on lines 35 to 43
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these paths even valid? It seems like the Ubuntu and Debian multiarch specs specially call out using the platform triplet and not just the plain machine/arch name.


Expand Down
Loading