Remove submodule update from mach bootstrap. Fixes #10010

This commit is contained in:
malayaleecoder 2016-03-15 22:28:33 +05:30
parent 183772583f
commit 4ee331059d
2 changed files with 1 additions and 35 deletions

View file

@ -15,12 +15,10 @@ import os
import os.path as path import os.path as path
import re import re
import shutil import shutil
import subprocess
import sys import sys
import StringIO import StringIO
import tarfile import tarfile
import urllib2 import urllib2
from distutils.version import LooseVersion
from mach.decorators import ( from mach.decorators import (
CommandArgument, CommandArgument,
@ -28,7 +26,7 @@ from mach.decorators import (
Command, 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): def download(desc, src, writer):
@ -280,36 +278,6 @@ class MachCommands(CommandBase):
print("Unable to parse chromium HSTS preload list, has the format changed?") print("Unable to parse chromium HSTS preload list, has the format changed?")
sys.exit(1) 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', @Command('clean-nightlies',
description='Clean unused nightly builds of Rust and Cargo', description='Clean unused nightly builds of Rust and Cargo',
category='bootstrap') category='bootstrap')

View file

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