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.66.0+dfsg1-1+rpi1^2~9 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9243e39b5d9ecc2de01d92e09c779f96be97be2e;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-gdb b/src/etc/rust-gdb index b950cea79e..5ec875258b 100755 --- a/src/etc/rust-gdb +++ b/src/etc/rust-gdb @@ -11,7 +11,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" # Run GDB with the additional arguments that load the pretty printers diff --git a/src/etc/rust-gdbgui b/src/etc/rust-gdbgui index 590e488e64..077890cfea 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" # Set the environment variable `RUST_GDB` to overwrite the call to a