Hardcode LLDB python module directory
authorAngus Lees <gus@debian.org>
Thu, 14 Jul 2022 11:17:39 +0000 (13:17 +0200)
committerJeremy Bícha <jbicha@ubuntu.com>
Mon, 26 Jun 2023 21:16:27 +0000 (22:16 +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..6b660fea20f5afa298d80b5cb296b84a4d181a18 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" >/dev/null 2>&1; then "$RUSTC" --print=sysroot; else echo /usr; fi)"
 RUST_LLDB="$RUSTC_SYSROOT/lib/rustlib/$host/bin/lldb"
 
-lldb=lldb
+lldb=lldb-15
 if [ -f "$RUST_LLDB" ]; then
     lldb="$RUST_LLDB"
 else