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

Commit 5cfc4b5

Browse files
committed
Include source packages in manifest
1 parent 72ae9cd commit 5cfc4b5

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

master/build-rust-manifest.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,12 +295,16 @@ def build_manifest(rustc_date, rustc_version, rustc_short_version,
295295
mingw_pkg = build_package_def_from_archive("rust-mingw", "dist", rustc_date,
296296
rustc_version, rustc_short_version,
297297
mingw_list)
298+
src_pkg = build_package_def_from_archive("rust-src", "dist", rustc_date,
299+
rustc_version, rustc_short_version,
300+
["*"])
298301

299302
packages["rustc"] = rustc_pkg
300303
packages["rust-std"] = std_pkg
301304
packages["rust-docs"] = doc_pkg
302305
packages["cargo"] = cargo_pkg
303306
packages["rust-mingw"] = mingw_pkg
307+
packages["rust-src"] = src_pkg
304308

305309
# Build the rust package. It is the only one with subcomponents
306310
rust_target_pkgs = {}
@@ -332,6 +336,12 @@ def build_manifest(rustc_date, rustc_version, rustc_short_version,
332336
"target": target,
333337
}]
334338

339+
# The src package is also an extension
340+
extensions += [{
341+
"pkg": "rust-src",
342+
"target": "*",
343+
}]
344+
335345
# The binaries of the 'rust' package are on the local disk.
336346
# url_and_hash_of_rust_package will try to locate them
337347
# and tell us where they are going to live on static.rust-lang.org
@@ -402,8 +412,14 @@ def live_package_url(name, dist_dir, date, version, target):
402412
if name == "cargo":
403413
maybe_channel = "nightly"
404414

405-
url1 = s3_addy + "/" + dist_dir + "/" + date + "/" + name + "-" + version + "-" + target + ".tar.gz"
406-
url2 = s3_addy + "/" + dist_dir + "/" + date + "/" + name + "-" + maybe_channel + "-" + target + ".tar.gz"
415+
if name == "rust-src":
416+
# The build system treats source packages as a separate target for `rustc`
417+
# but for rustup we'd like to treat them as a completely separate package.
418+
url1 = s3_addy + "/" + dist_dir + "/" + date + "/rustc-" + version + "-src.tar.gz"
419+
url2 = s3_addy + "/" + dist_dir + "/" + date + "/rustc-" + maybe_channel + "-src.tar.gz"
420+
else:
421+
url1 = s3_addy + "/" + dist_dir + "/" + date + "/" + name + "-" + version + "-" + target + ".tar.gz"
422+
url2 = s3_addy + "/" + dist_dir + "/" + date + "/" + name + "-" + maybe_channel + "-" + target + ".tar.gz"
407423

408424
print "checking " + url1
409425
request = urllib2.Request(url1)

0 commit comments

Comments
 (0)