Skip to content

Commit

Permalink
Use package name for top-level directory in bare tarballs
Browse files Browse the repository at this point in the history
This fixes a bug introduced by rust-lang#79788.
  • Loading branch information
Mark-Simulacrum committed Dec 26, 2020
1 parent 89524d0 commit fe52a65
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/bootstrap/tarball.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
})
Expand Down

0 comments on commit fe52a65

Please sign in to comment.