diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:49 +0000 |
commit | e3cd3a4089ba65c4c74a129653cef5231ccd7572 (patch) | |
tree | 793659873c58be8d80c9ac82f23dc35b37002d28 /debian/patches/u-fix-sysroot-detection-logic.patch | |
parent | Merging upstream version 1.69.0+dfsg1. (diff) | |
download | rustc-e3cd3a4089ba65c4c74a129653cef5231ccd7572.tar.xz rustc-e3cd3a4089ba65c4c74a129653cef5231ccd7572.zip |
Adding debian version 1.69.0+dfsg1-1.debian/1.69.0+dfsg1-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/u-fix-sysroot-detection-logic.patch')
-rw-r--r-- | debian/patches/u-fix-sysroot-detection-logic.patch | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/debian/patches/u-fix-sysroot-detection-logic.patch b/debian/patches/u-fix-sysroot-detection-logic.patch index 3bb0797ba..64cc291f7 100644 --- a/debian/patches/u-fix-sysroot-detection-logic.patch +++ b/debian/patches/u-fix-sysroot-detection-logic.patch @@ -6,7 +6,7 @@ Description: Fix sysroot detection which would result in /usr/lib/lib/rustlib Bug: https://github.com/rust-lang/rust/issues/109994 --- a/compiler/rustc_session/src/filesearch.rs +++ b/compiler/rustc_session/src/filesearch.rs -@@ -180,18 +180,29 @@ +@@ -179,7 +179,7 @@ ))?; // if `dir` points target's dir, move up to the sysroot @@ -14,15 +14,17 @@ Bug: https://github.com/rust-lang/rust/issues/109994 + let mut sysroot_dir = if dir.ends_with(crate::config::host_triple()) { dir.parent() // chop off `$target` .and_then(|p| p.parent()) // chop off `rustlib` - .and_then(|p| p.parent()) // chop off `lib` + .and_then(|p| { +@@ -194,13 +194,25 @@ + } + }) .map(|s| s.to_owned()) - .ok_or(format!( -- "Could not move 3 levels upper using `parent()` on {}", -- dir.display() ++ .ok_or_else(|| format!( + "Could not move 3 levels upper using `parent()` on {}", + dir.display() - )) -+ .ok_or_else(|| { -+ format!("Could not move 3 levels upper using `parent()` on {}", dir.display()) -+ })? ++ ))? } else { - Ok(dir.to_owned()) + dir.to_owned() |