@@ -25,7 +25,6 @@ use chrono::Utc;
2525use curl:: easy:: Easy ;
2626use fs2:: FileExt ;
2727use github:: { CreateTag , Github } ;
28- use rayon:: prelude:: * ;
2928
3029use crate :: config:: { Channel , Config } ;
3130
@@ -173,26 +172,13 @@ impl Context {
173172
174173 self . assert_all_components_present ( ) ?;
175174
176- // Quickly produce gzip compressed artifacts that are needed for successful manifest
177- // building.
175+ // Produce a full set of artifacts so that pruning works correctly.
178176 //
179177 // Nightly (1.71+) supports this upstream without the extra recompression, see
180- // https://github.com/rust-lang/rust/pull/110436.
178+ // https://github.com/rust-lang/rust/pull/110436. We expect that this snippet can be fully
179+ // dropped once that PR hits stable.
181180 if self . config . channel != Channel :: Nightly {
182- let version = match self . config . channel {
183- Channel :: Stable => self . current_version . as_deref ( ) . unwrap ( ) ,
184- Channel :: Beta => "beta" ,
185- Channel :: Nightly => "nightly" ,
186- } ;
187- let recompress = [
188- self . dl_dir ( )
189- . join ( format ! ( "rust-{}-x86_64-unknown-linux-gnu.tar.xz" , version) ) ,
190- self . dl_dir ( )
191- . join ( format ! ( "cargo-{}-x86_64-unknown-linux-gnu.tar.xz" , version) ) ,
192- ] ;
193- recompress. par_iter ( ) . try_for_each ( |tarball| {
194- recompress:: recompress_file ( tarball, false , flate2:: Compression :: fast ( ) , false )
195- } ) ?;
181+ self . recompress ( & self . dl_dir ( ) ) ?;
196182 }
197183
198184 // Ok we've now determined that a release needs to be done.
@@ -214,7 +200,9 @@ impl Context {
214200
215201 // Generate recompressed artifacts from the input set. This invalidates signatures etc
216202 // produced in the earlier step so we'll need to re-run the manifest building.
217- self . recompress ( & self . dl_dir ( ) ) ?;
203+ if self . config . channel == Channel :: Nightly {
204+ self . recompress ( & self . dl_dir ( ) ) ?;
205+ }
218206
219207 // Since we recompressed, need to clear out the checksum cache.
220208 build_manifest. clear_checksum_cache ( ) ?;
0 commit comments