From 375f84002b9901ea59a98f30b5af1b6a7b46f565 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 11 Jan 2025 08:40:48 +0000 Subject: [PATCH] rustup: Correct patchelf patch's use of create_dir When updating a toolchain (rustup update stable) the previously created wrapped ld.lld causes the new setup to fail. This is not ideal as it either is a spurious error, or it indicates that the update has failed when it shouldn't have. By using create_dir_all instead of create_dir, we avoid this problem. Signed-off-by: Daniel Silverstone --- .../tools/rust/rustup/0001-dynamically-patchelf-binaries.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/rust/rustup/0001-dynamically-patchelf-binaries.patch b/pkgs/development/tools/rust/rustup/0001-dynamically-patchelf-binaries.patch index c3d3b5f8d7b1..ecd8eb3837f9 100644 --- a/pkgs/development/tools/rust/rustup/0001-dynamically-patchelf-binaries.patch +++ b/pkgs/development/tools/rust/rustup/0001-dynamically-patchelf-binaries.patch @@ -23,7 +23,7 @@ index dfccc661..85233f3b 100644 + let mut unwrapped_name = path.file_name().unwrap().to_string_lossy().to_string(); + unwrapped_name.push_str("-unwrapped"); + let unwrapped_dir = path.with_file_name(unwrapped_name); -+ fs::create_dir(&unwrapped_dir).context("failed to create unwrapped directory")?; ++ fs::create_dir_all(&unwrapped_dir).context("failed to create unwrapped directory")?; + let mut unwrapped_lld = unwrapped_dir; + unwrapped_lld.push(dest_lld_path.file_name().unwrap()); + fs::rename(dest_lld_path, &unwrapped_lld).context("failed to move file")?;