mirror of
https://github.com/servo/servo.git
synced 2025-06-21 07:38:59 +01:00
Remove submodule update from mach bootstrap. Fixes #10010
This commit is contained in:
parent
183772583f
commit
4ee331059d
2 changed files with 1 additions and 35 deletions
|
@ -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')
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue