aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/bootstrap_commands.py
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2014-11-05 18:51:36 -0700
committerbors-servo <metajack+bors@gmail.com>2014-11-05 18:51:36 -0700
commit5dae1de2f5226527862a39608f0d7ad217c33b31 (patch)
tree781c94e9fcf125f61e06837f7d1edcb1cc11fce6 /python/servo/bootstrap_commands.py
parentf09c314420c6fdd631c605bec150950a25970326 (diff)
parent2ee516fa7ca43a2bede2b97aa7dbd80709e4828f (diff)
downloadservo-5dae1de2f5226527862a39608f0d7ad217c33b31.tar.gz
servo-5dae1de2f5226527862a39608f0d7ad217c33b31.zip
auto merge of #3902 : mbrubeck/servo/share_directory, r=jdm
This is @acmiyaguchi's already-reviewed patch from #3388, rebased and squashed onto servo master. Fixes #3353.
Diffstat (limited to 'python/servo/bootstrap_commands.py')
-rw-r--r--python/servo/bootstrap_commands.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py
index b92198aae3c..1a1d95adde0 100644
--- a/python/servo/bootstrap_commands.py
+++ b/python/servo/bootstrap_commands.py
@@ -78,7 +78,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.")
@@ -107,7 +107,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.topdir, "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.")
@@ -115,11 +116,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)