summaryrefslogtreecommitdiff
path: root/resources/tianocore
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-04-26 06:38:38 +0100
committerLeah Rowe <leah@libreboot.org>2025-04-26 06:43:49 +0100
commit0ab7c6ff9cf1eda98d005381fd99ce794be166c2 (patch)
treee84ea5328d1011f8e96e4543fb53080e6575ff67 /resources/tianocore
parent8edea026c58f06fa7af0ec9b20450641acccbefe (diff)
lib.sh: use realpath to get sys python on venvHEADmaster
In the previous revision, I make hardcoded use of /usr/local/bin and /usr/bin as search locations, instead of relying on PATH, when the user has a python venv, because in those cases, we cannot rely on PATH so we use a python command to detect the venv and then force use of the normal system path for python. However, there's no guarantee that the real Python will indeed live at these locations. For example, some distros like Nix or Guix will use many locations for different versions of a given package, and it's for the birds as to what given package version the user might be running. Therefore, this patch retains that current hardcoded assumption of /usr/local/bin and /usr/bin but *only* as a fallback solution, instead checking realpath first. The "realpath" command isn't technically POSIX standard, but in practise it is available on GNU coreutils, Busybox, and the various BSD userlands. I could perhaps *import* a realpath utility, and use that, but this should be fine. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'resources/tianocore')
0 files changed, 0 insertions, 0 deletions