@@ -295,12 +295,16 @@ def build_manifest(rustc_date, rustc_version, rustc_short_version,
295
295
mingw_pkg = build_package_def_from_archive ("rust-mingw" , "dist" , rustc_date ,
296
296
rustc_version , rustc_short_version ,
297
297
mingw_list )
298
+ src_pkg = build_package_def_from_archive ("rust-src" , "dist" , rustc_date ,
299
+ rustc_version , rustc_short_version ,
300
+ ["*" ])
298
301
299
302
packages ["rustc" ] = rustc_pkg
300
303
packages ["rust-std" ] = std_pkg
301
304
packages ["rust-docs" ] = doc_pkg
302
305
packages ["cargo" ] = cargo_pkg
303
306
packages ["rust-mingw" ] = mingw_pkg
307
+ packages ["rust-src" ] = src_pkg
304
308
305
309
# Build the rust package. It is the only one with subcomponents
306
310
rust_target_pkgs = {}
@@ -332,6 +336,12 @@ def build_manifest(rustc_date, rustc_version, rustc_short_version,
332
336
"target" : target ,
333
337
}]
334
338
339
+ # The src package is also an extension
340
+ extensions += [{
341
+ "pkg" : "rust-src" ,
342
+ "target" : "*" ,
343
+ }]
344
+
335
345
# The binaries of the 'rust' package are on the local disk.
336
346
# url_and_hash_of_rust_package will try to locate them
337
347
# 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):
402
412
if name == "cargo" :
403
413
maybe_channel = "nightly"
404
414
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"
407
423
408
424
print "checking " + url1
409
425
request = urllib2 .Request (url1 )
0 commit comments