Bug 1545968 - Update repack_rust.py to include rust stdlib src and analysis data. r=glandium
☠☠ backed out by 50f2bf78b087 ☠ ☠
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 23 Apr 2019 15:36:56 +0000
changeset 472904 588a1949ec96b2ad35bbb97db08de10bfa609944
parent 472903 1d8541a0ffe7f3f185f55f4c5a3939f6c6e28e6b
child 472905 0e0001b3de603326137d39ab63cae656638ad2dc
push id35983
push userncsoregi@mozilla.com
push dateWed, 08 May 2019 03:38:51 +0000
treeherdermozilla-central@0e9e744accd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1545968 - Update repack_rust.py to include rust stdlib src and analysis data. r=glandium This makes the rust toolchain artifacts contain the rust stdlib as well, for use by searchfox. It does bring up the size of the toolchain artifact slightly - rustc.tar.xz file for the Linux/rust 1.34 job for example goes from 270483672 bytes to 273803148 bytes (1.23% larger) and the equivalent android tarball goes from 230503888 to 235698736 bytes (2.25% larger). Differential Revision: https://phabricator.services.mozilla.com/D28282
--- a/taskcluster/scripts/misc/repack_rust.py
+++ b/taskcluster/scripts/misc/repack_rust.py
@@ -200,17 +200,17 @@ def install(filename, target):
     log('Cleaning %s...' % basename)
 def package(manifest, pkg, target):
     '''Pull out the package dict for a particular package and target
     from the given manifest.'''
     version = manifest['pkg'][pkg]['version']
-    info = manifest['pkg'][pkg]['target'][target]
+    info = manifest['pkg'][pkg]['target'].get(target, '*')
     return (version, info)
 def fetch_package(manifest, pkg, host):
     version, info = package(manifest, pkg, host)
     log('%s %s\n  %s\n  %s' % (pkg, version, info['url'], info['hash']))
     if not info['available']:
         log('%s marked unavailable for %s' % (pkg, host))
@@ -221,18 +221,18 @@ def fetch_package(manifest, pkg, host):
             '\n  %s' % sha)
         raise AssertionError
     return info
 def fetch_std(manifest, targets):
     stds = []
     for target in targets:
-        info = fetch_package(manifest, 'rust-std', target)
-        stds.append(info)
+        stds.append(fetch_package(manifest, 'rust-std', target))
+        stds.append(fetch_package(manifest, 'rust-analysis', target))
     return stds
 def fetch_optional(manifest, pkg, host):
         return fetch_package(manifest, pkg, host)
     except KeyError:
         # The package is not available, oh well!
@@ -273,28 +273,30 @@ def repack(host, targets, channel='stabl
         cargo_manifest = fetch_manifest(cargo_channel)
         log('Using manifest for cargo %s as of %s.' %
             (cargo_channel, cargo_manifest['date']))
     log('Fetching packages...')
     rustc = fetch_package(manifest, 'rustc', host)
     cargo = fetch_package(cargo_manifest, 'cargo', host)
     stds = fetch_std(manifest, targets)
+    rustsrc = fetch_package(manifest, 'rust-src', host)
     rustfmt = fetch_optional(manifest, 'rustfmt-preview', host)
     log('Installing packages...')
     install_dir = 'rustc'
     # Clear any previous install directory.
     except OSError as e:
         if e.errno != errno.ENOENT:
     install(os.path.basename(rustc['url']), install_dir)
     install(os.path.basename(cargo['url']), install_dir)
+    install(os.path.basename(rustsrc['url']), install_dir)
     if rustfmt:
         install(os.path.basename(rustfmt['url']), install_dir)
     for std in stds:
         install(os.path.basename(std['url']), install_dir)
     log('Creating archive...')
     tar_options, tar_ext = tar_for_host(host)