diff options
| author | bors <bors@rust-lang.org> | 2020-12-28 08:29:02 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-12-28 08:29:02 +0000 |
| commit | aef92d44e4e83fe7d5ddb741a274754466207402 (patch) | |
| tree | c6589635a26259fc21cd04967f0aa935e28e23e0 /src/bootstrap | |
| parent | 6c523a7a0ef121fe97ad6a367a3f3b92f80dc3f0 (diff) | |
| parent | fe52a6518628cd026a8c7e64c59183ca3c4b9144 (diff) | |
| download | rust-aef92d44e4e83fe7d5ddb741a274754466207402.tar.gz rust-aef92d44e4e83fe7d5ddb741a274754466207402.zip | |
Auto merge of #80397 - Mark-Simulacrum:fix-bare-tarball, r=pietroalbini
Use package name for top-level directory in bare tarballs This fixes a bug introduced by #79788. r? `@pietroalbini`
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/tarball.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bootstrap/tarball.rs b/src/bootstrap/tarball.rs index 5d73a655427..32c8e791bfc 100644 --- a/src/bootstrap/tarball.rs +++ b/src/bootstrap/tarball.rs @@ -241,10 +241,16 @@ impl<'a> Tarball<'a> { } pub(crate) fn bare(self) -> PathBuf { + // Bare tarballs should have the top level directory match the package + // name, not "image". We rename the image directory just before passing + // into rust-installer. + let dest = self.temp_dir.join(self.package_name()); + t!(std::fs::rename(&self.image_dir, &dest)); + self.run(|this, cmd| { cmd.arg("tarball") .arg("--input") - .arg(&this.image_dir) + .arg(&dest) .arg("--output") .arg(crate::dist::distdir(this.builder).join(this.package_name())); }) |
