From 6ae5598a5ca7811de122c89db67df89f9a163bbc Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 7 Jul 2016 17:07:00 +0200 Subject: =?UTF-8?q?Fix=20"looking=20for=20rustc=20at=20=E2=80=A6"=20messag?= =?UTF-8?q?e=20for=20stable=20when=20already=20bootstrapped?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also always download from static-rust-lang-org.s3.amazonaws.com instead of static.rust-lang.org. They host the same content, but the latter goes through a CDN and has a TLS certificate that failed to verify and some Python versions: https://github.com/servo/servo/issues/3582 https://github.com/servo/servo/pull/3971 --- python/servo/bootstrap_commands.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'python/servo/bootstrap_commands.py') diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py index a4cf509f113..8bae1838ecb 100644 --- a/python/servo/bootstrap_commands.py +++ b/python/servo/bootstrap_commands.py @@ -138,12 +138,7 @@ class MachCommands(CommandBase): self.set_use_stable_rust(stable) version = self.rust_version() rust_path = self.rust_path() - if stable: - rust_dir = path.join( - self.context.sharedir, "rust", version, rust_path) - else: - rust_dir = path.join( - self.context.sharedir, "rust", rust_path) + rust_dir = path.join(self.context.sharedir, "rust", rust_path) install_dir = path.join(self.context.sharedir, "rust", version) if not force and path.exists(path.join(rust_dir, "rustc", "bin", "rustc" + BIN_SUFFIX)): @@ -160,9 +155,10 @@ class MachCommands(CommandBase): # giving a directory name that will be the same as the tarball name (rustc is # in that directory). if stable: - rustc_url = "https://static.rust-lang.org/dist/%s.tar.gz" % rust_path + tarball = "rustc-%s-%s.tar.gz" % (version, host_triple()) else: - rustc_url = "https://static-rust-lang-org.s3.amazonaws.com/dist/%s.tar.gz" % rust_path + tarball = "%s/rustc-nightly-%s.tar.gz" % (version, host_triple()) + rustc_url = "https://static-rust-lang-org.s3.amazonaws.com/dist/" + tarball tgz_file = rust_dir + '-rustc.tar.gz' download_file("Rust compiler", rustc_url, tgz_file) -- cgit v1.2.3