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>
Thu, 20 Feb 2025 18:23:02 +0000 (19:23 +0100)
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 bce72f1bad698d45b0743adf0b9fb78fc9f039b2..38e76c21097bd0c0d502e43f5ff052a68d341354 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-17
 if [ -f "$RUST_LLDB" ]; then
     lldb="$RUST_LLDB"
 else