Auto merge of #10013 - malayaleecoder:master, r=Wafflespeanut

Remove submodule update from mach bootstrap. Fixes #10010

Tries to fix #10010 . Please have a look.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10013)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-03-16 00:19:04 +05:30
commit 1a60e07ee8
2 changed files with 1 additions and 35 deletions

View file

@ -15,12 +15,10 @@ import os
import os.path as path
import re
import shutil
import subprocess
import sys
import StringIO
import tarfile
import urllib2
from distutils.version import LooseVersion
from mach.decorators import (
CommandArgument,
@ -28,7 +26,7 @@ from mach.decorators import (
Command,
)
from servo.command_base import CommandBase, cd, host_triple, check_call, BIN_SUFFIX
from servo.command_base import CommandBase, host_triple, BIN_SUFFIX
def download(desc, src, writer):
@ -280,36 +278,6 @@ class MachCommands(CommandBase):
print("Unable to parse chromium HSTS preload list, has the format changed?")
sys.exit(1)
@Command('update-submodules',
description='Update submodules',
category='bootstrap')
def update_submodules(self):
# Ensure that the installed git version is >= 1.8.1
gitversion_output = subprocess.check_output(["git", "--version"])
gitversion = LooseVersion(gitversion_output.split(" ")[-1])
if gitversion < LooseVersion("1.8.1"):
print("Git version 1.8.1 or above required. Current version is {}"
.format(gitversion))
sys.exit(1)
submodules = subprocess.check_output(["git", "submodule", "status"])
for line in submodules.split('\n'):
components = line.strip().split(' ')
if len(components) > 1:
module_path = components[1]
if path.exists(module_path):
with cd(module_path):
output = subprocess.check_output(
["git", "status", "--porcelain"])
if len(output) != 0:
print("error: submodule %s is not clean"
% module_path)
print("\nClean the submodule and try again.")
return 1
check_call(
["git", "submodule", "--quiet", "sync", "--recursive"])
check_call(
["git", "submodule", "update", "--init", "--recursive"])
@Command('clean-nightlies',
description='Clean unused nightly builds of Rust and Cargo',
category='bootstrap')

View file

@ -401,8 +401,6 @@ class CommandBase(object):
if self.context.bootstrapped:
return
Registrar.dispatch("update-submodules", context=self.context)
if not self.config["tools"]["system-rust"] and \
(not path.exists(path.join(
self.config["tools"]["rust-root"], "rustc", "bin", "rustc" + BIN_SUFFIX)) or