From 8cd4cacbc797cf3ab5024bc819c228cd264aa82e Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 24 Aug 2017 23:25:35 +0200 Subject: [PATCH 1/2] include Cargo.{toml,lock} in rust-src tarball --- src/bootstrap/dist.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs index bfcfb5f9a37f8..8d3fc0669822e 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs @@ -724,6 +724,10 @@ impl Step for Src { let dst_src = dst.join("rust"); t!(fs::create_dir_all(&dst_src)); + let src_files = [ + "src/Cargo.toml", + "src/Cargo.lock", + ]; // This is the reduced set of paths which will become the rust-src component // (essentially libstd and all of its path dependencies) let std_src_dirs = [ @@ -759,6 +763,9 @@ impl Step for Src { ]; copy_src_dirs(build, &std_src_dirs[..], &std_src_dirs_exclude[..], &dst_src); + for file in src_files.iter() { + copy(&build.src.join(file), &dst_src.join(file)); + } // Create source tarball in rust-installer format let mut cmd = rust_installer(builder); From bd24325ce1c4af21d519ca38e6973a6018ee7ad8 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 26 Aug 2017 15:29:17 +0200 Subject: [PATCH 2/2] Do not include the src/Cargo.toml distcheck complains that this file references projects not cotnained in the tarball --- src/bootstrap/dist.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs index 8d3fc0669822e..bd1cae65a3598 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs @@ -725,7 +725,6 @@ impl Step for Src { t!(fs::create_dir_all(&dst_src)); let src_files = [ - "src/Cargo.toml", "src/Cargo.lock", ]; // This is the reduced set of paths which will become the rust-src component