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.81.0+dfsg1-2+rpi1~1^2~11 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c3d43ea390b3093c49d55df3b10691bf6f09965b;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')"