File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/tools/rust-installer/src Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,11 @@ impl Tarballer {
5353 // Sort files by their suffix, to group files with the same name from
5454 // different locations (likely identical) and files with the same
5555 // extension (likely containing similar data).
56- let ( dirs, mut files) = get_recursive_paths ( & self . work_dir , & self . input )
56+ // Sorting of file and directory paths also helps with the reproducibility
57+ // of the resulting archive.
58+ let ( mut dirs, mut files) = get_recursive_paths ( & self . work_dir , & self . input )
5759 . context ( "failed to collect file paths" ) ?;
60+ dirs. sort ( ) ;
5861 files. sort_by ( |a, b| a. bytes ( ) . rev ( ) . cmp ( b. bytes ( ) . rev ( ) ) ) ;
5962
6063 // Write the tar into both encoded files. We write all directories
You can’t perform that action at this time.
0 commit comments