Skip to content
This repository was archived by the owner on Nov 21, 2018. It is now read-only.

Commit 9a42f2a

Browse files
committed
Fix linux src dupes harder
1 parent 4ff2904 commit 9a42f2a

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

master/master.cfg

+8-10
Original file line numberDiff line numberDiff line change
@@ -1401,6 +1401,14 @@ def distsnap_buildfactory(platform, channel_label):
14011401
f.addStep(MasterShellCommand(name="rm non-linux src tarballs",
14021402
command=["sh", "-c", WithProperties(rm_src_tarballs_cmd)]))
14031403

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+
14041412
# Upload everything that's left
14051413
f = finish_dist(f, local_dist_dir, dist_platforms, s3_addy, "dist", "rustc", channel_label, True)
14061414

@@ -1424,16 +1432,6 @@ def finish_dist(f, local_dist_dir, dist_subdirs, s3_addy, remote_dist_dir, compo
14241432
f.addStep(MasterShellCommand(name="rm commit-id",
14251433
command=["sh", "-c", rm_commit_ids_cmd]))
14261434

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-
14371435
# Consolidate everything that's left under one directory for final upload. There
14381436
# should be no duplicate artifacts across platforms at this point.
14391437
final_dist_dir = local_dist_dir + "/final"

0 commit comments

Comments
 (0)