Hardcode GDB python module directory
authorAngus Lees <gus@debian.org>
Sun, 5 Jul 2020 14:06:52 +0000 (15:06 +0100)
committerXimin Luo <infinity0@debian.org>
Sun, 5 Jul 2020 14:06:52 +0000 (15:06 +0100)
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

src/etc/rust-gdb

index 23ba93da8e52932671db9638f2a1d6f196ac5d18..dc962bf5eb9e899ce608ae9af89a51198fbed09a 100755 (executable)
@@ -3,8 +3,10 @@
 set -e
 
 # Find out where the pretty printer Python module is
-RUSTC_SYSROOT=`rustc --print=sysroot`
-GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
+#RUSTC_SYSROOT=`rustc --print=sysroot`
+#GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
+# We can just hardcode this on Debian, and remove the rustc dependency
+GDB_PYTHON_MODULE_DIRECTORY="/usr/share/rust-gdb"
 
 # Run GDB with the additional arguments that load the pretty printers
 # Set the environment variable `RUST_GDB` to overwrite the call to a