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.70.0+dfsg1-7+rpi1~10 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b43033b08ea16f9b3ea7287de135a39b494af846;p=rustc.git Hardcode GDB python module directory Forwarded: not-needed Debian package installs python modules into a fixed directory, so just hardcode path in wrapper script. Gbp-Pq: Name d-rust-gdb-paths --- diff --git a/src/etc/rust-gdbgui b/src/etc/rust-gdbgui index 913269316b..02ac9ec210 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')"