From 75b340a243f4740376497a52e1c2eb639d9ac827 Mon Sep 17 00:00:00 2001 From: Anthony Miyaguchi Date: Wed, 17 Sep 2014 01:55:53 -0700 Subject: Fixes #3353: rust snapshot downloads to home directory --- python/servo/bootstrap_commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python/servo/bootstrap_commands.py') diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py index 536e6234497..825796ea311 100644 --- a/python/servo/bootstrap_commands.py +++ b/python/servo/bootstrap_commands.py @@ -67,7 +67,7 @@ class MachCommands(CommandBase): help='Force download even if a snapshot already exists') def bootstrap_rustc(self, force=False): rust_dir = path.join( - self.context.topdir, "rust", *self.rust_snapshot_path().split("/")) + self.context.sharedir, "rust", *self.rust_snapshot_path().split("/")) if not force and path.exists(path.join(rust_dir, "bin", "rustc")): print("Snapshot Rust compiler already downloaded.", end=" ") print("Use |bootstrap_rust --force| to download again.") @@ -96,7 +96,7 @@ class MachCommands(CommandBase): action='store_true', help='Force download even if cargo already exists') def bootstrap_cargo(self, force=False): - cargo_dir = path.join(self.context.topdir, "cargo") + cargo_dir = path.join(self.context.sharedir, "cargo") if not force and path.exists(path.join(cargo_dir, "bin", "cargo")): print("Cargo already downloaded.", end=" ") print("Use |bootstrap_cargo --force| to download again.") -- cgit v1.2.3 From 2ee516fa7ca43a2bede2b97aa7dbd80709e4828f Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Wed, 5 Nov 2014 13:59:31 -0800 Subject: Automatically update cargo when necessary --- python/servo/bootstrap_commands.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'python/servo/bootstrap_commands.py') diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py index 825796ea311..4494d4d4c06 100644 --- a/python/servo/bootstrap_commands.py +++ b/python/servo/bootstrap_commands.py @@ -96,7 +96,8 @@ class MachCommands(CommandBase): action='store_true', help='Force download even if cargo already exists') def bootstrap_cargo(self, force=False): - cargo_dir = path.join(self.context.sharedir, "cargo") + cargo_dir = path.join(self.context.sharedir, "cargo", + self.cargo_build_id()) if not force and path.exists(path.join(cargo_dir, "bin", "cargo")): print("Cargo already downloaded.", end=" ") print("Use |bootstrap_cargo --force| to download again.") @@ -104,11 +105,12 @@ class MachCommands(CommandBase): if path.isdir(cargo_dir): shutil.rmtree(cargo_dir) - os.mkdir(cargo_dir) + os.makedirs(cargo_dir) tgz_file = "cargo-nightly-%s.tar.gz" % host_triple() # FIXME(#3582): use https. - nightly_url = "http://static.rust-lang.org/cargo-dist/2014-10-21/%s" % tgz_file + nightly_url = "http://static.rust-lang.org/cargo-dist/%s/%s" % \ + (self.cargo_build_id(), tgz_file) download("Cargo nightly", nightly_url, tgz_file) -- cgit v1.2.3