Do not use absolute path for ldconfig

This commit is contained in:
Andrew Murray 2023-03-30 16:55:18 +11:00
parent e945437195
commit c3364a4245

View File

@ -166,14 +166,14 @@ def _find_library_dirs_ldconfig():
# Assuming GLIBC's ldconfig (with option -p) # Assuming GLIBC's ldconfig (with option -p)
# Alpine Linux uses musl that can't print cache # Alpine Linux uses musl that can't print cache
args = ["/sbin/ldconfig", "-p"] args = ["ldconfig", "-p"]
expr = rf".*\({abi_type}.*\) => (.*)" expr = rf".*\({abi_type}.*\) => (.*)"
env = dict(os.environ) env = dict(os.environ)
env["LC_ALL"] = "C" env["LC_ALL"] = "C"
env["LANG"] = "C" env["LANG"] = "C"
elif sys.platform.startswith("freebsd"): elif sys.platform.startswith("freebsd"):
args = ["/sbin/ldconfig", "-r"] args = ["ldconfig", "-r"]
expr = r".* => (.*)" expr = r".* => (.*)"
env = {} env = {}