Hardcode GDB python module directory
authorAngus Lees <gus@debian.org>
Sat, 7 Nov 2020 21:21:03 +0000 (21:21 +0000)
committerXimin Luo <infinity0@debian.org>
Sat, 7 Nov 2020 21:21:03 +0000 (21:21 +0000)
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 b950cea79edfeaef99761ae1ab76d5cee09cf974..767cac83952021d440a81743aa18c05d399bfc0d 100755 (executable)
@@ -11,8 +11,10 @@ else
 fi
 
 # 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