@@ -1401,6 +1401,14 @@ def distsnap_buildfactory(platform, channel_label):
1401
1401
f .addStep (MasterShellCommand (name = "rm non-linux src tarballs" ,
1402
1402
command = ["sh" , "-c" , WithProperties (rm_src_tarballs_cmd )]))
1403
1403
1404
+ # Remove the rust-src package from all but the 'linux' platform. This
1405
+ # package is produced by all builders and if we don't drop the dupes now
1406
+ # then the subsequent 'cp' command to consolidate them will fail.
1407
+ non_linux_dist_dirs = [(local_dist_dir + "/" + p ) for p in non_linux_platforms ]
1408
+ rm_dupes_cmd = "find " + " " .join (non_linux_dist_dirs ) + " -name rust-src-" + channel + ".tar.gz | xargs rm -f"
1409
+ f .addStep (MasterShellCommand (name = "rm duplicate source packages" ,
1410
+ command = ["sh" , "-c" , WithProperties (rm_dupes_cmd )]))
1411
+
1404
1412
# Upload everything that's left
1405
1413
f = finish_dist (f , local_dist_dir , dist_platforms , s3_addy , "dist" , "rustc" , channel_label , True )
1406
1414
@@ -1424,16 +1432,6 @@ def finish_dist(f, local_dist_dir, dist_subdirs, s3_addy, remote_dist_dir, compo
1424
1432
f .addStep (MasterShellCommand (name = "rm commit-id" ,
1425
1433
command = ["sh" , "-c" , rm_commit_ids_cmd ]))
1426
1434
1427
- # Remove the rust-src package from all but the 'linux' platform. This
1428
- # package is produced by all builders and if we don't drop the dupes now
1429
- # then the subsequent 'cp' command to consolidate them will fail.
1430
- non_linux_dist_subdirs = list (dist_subdirs )
1431
- non_linux_dist_subdirs .remove ("linux" )
1432
- non_linux_dist_dirs = [(local_dist_dir + "/" + p ) for p in non_linux_dist_subdirs ]
1433
- rm_dupes_cmd = "find " + " " .join (non_linux_dist_dirs ) + " -name rust-src-" + channel + ".tar.gz | xargs rm -f"
1434
- f .addStep (MasterShellCommand (name = "removing duplicate source packages" ,
1435
- command = ["sh" , "-c" , WithProperties (rm_dupes_cmd )]))
1436
-
1437
1435
# Consolidate everything that's left under one directory for final upload. There
1438
1436
# should be no duplicate artifacts across platforms at this point.
1439
1437
final_dist_dir = local_dist_dir + "/final"
0 commit comments