Hardcode LLDB python module directory
authorAngus Lees <gus@debian.org>
Thu, 14 Jul 2022 11:17:39 +0000 (13:17 +0200)
committerFabian Grünbichler <debian@fabian.gruenbichler.email>
Wed, 8 Apr 2026 17:02:02 +0000 (19:02 +0200)
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-lldb-paths.patch

src/etc/rust-lldb

index f8f31903060c3551485cc224e3bade22751fa01a..3190462610fffefe5cf01bcff5562736db0fe32b 100755 (executable)
@@ -7,10 +7,10 @@ set -e
 host=$(rustc --print host-tuple)
 
 # 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-21
 if [ -f "$RUST_LLDB" ]; then
     lldb="$RUST_LLDB"
 else