Hardcode LLDB python module directory
authorAngus Lees <gus@debian.org>
Sun, 19 Sep 2021 18:48:33 +0000 (19:48 +0100)
committerXimin Luo <infinity0@debian.org>
Sun, 19 Sep 2021 18:48:33 +0000 (19:48 +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-lldb-paths

src/etc/rust-lldb

index bce72f1bad698d45b0743adf0b9fb78fc9f039b2..763afb8ace8f80ed0a3e0fcb5a35ee8c13167abc 100755 (executable)
@@ -7,10 +7,10 @@ set -e
 host=$(rustc -vV | sed -n -e 's/^host: //p')
 
 # Find out where to look for the pretty printer Python module
-RUSTC_SYSROOT=$(rustc --print sysroot)
+RUSTC_SYSROOT="$(if type "$RUSTC" 2>/dev/null; then "$RUSTC" --print=sysroot; else echo /usr; fi)"
 RUST_LLDB="$RUSTC_SYSROOT/lib/rustlib/$host/bin/lldb"
 
-lldb=lldb
+lldb=lldb-11
 if [ -f "$RUST_LLDB" ]; then
     lldb="$RUST_LLDB"
 else