From: Angus Lees Date: Thu, 14 Jul 2022 11:17:39 +0000 (+0200) Subject: Hardcode GDB python module directory X-Git-Tag: archive/raspbian/1.85.0+dfsg3-1+rpi1^2~19 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e0a6a64b02ab86fdd86f6ba380fc76537a1fe479;p=rustc.git Hardcode GDB python module directory Debian package installs python modules into a fixed directory, so just hardcode path in wrapper script. Forwarded: not-needed Gbp-Pq: Topic behaviour Gbp-Pq: Name d-rust-gdb-paths.patch --- diff --git a/src/etc/rust-gdbgui b/src/etc/rust-gdbgui index 471810cbb1..be62b4445b 100755 --- a/src/etc/rust-gdbgui +++ b/src/etc/rust-gdbgui @@ -40,7 +40,7 @@ else fi # Find out where the pretty printer Python module is -RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)" +RUSTC_SYSROOT="$(if type "$RUSTC" >/dev/null 2>&1; then "$RUSTC" --print=sysroot; else echo /usr; fi)" GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc" # Get the commit hash for path remapping RUSTC_COMMIT_HASH="$("$RUSTC" -vV | sed -n 's/commit-hash: \([a-zA-Z0-9_]*\)/\1/p')"