aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/bootstrap.py
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2018-09-03 15:05:21 +0530
committerManish Goregaokar <manishsmail@gmail.com>2018-09-11 19:34:38 +0530
commite72e08ea9c7ed2f19ec7539984a3740db056fdba (patch)
treecb8640fc41f0a711fa4745e54ef50e95e67193d0 /python/servo/bootstrap.py
parent6b75aa47cb6c34c6e34051ecd126e0982fc669e7 (diff)
downloadservo-e72e08ea9c7ed2f19ec7539984a3740db056fdba.tar.gz
servo-e72e08ea9c7ed2f19ec7539984a3740db056fdba.zip
Allow bootstrap to be run before anything else is installed
Diffstat (limited to 'python/servo/bootstrap.py')
-rw-r--r--python/servo/bootstrap.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/python/servo/bootstrap.py b/python/servo/bootstrap.py
index c2c046d2609..2bbc3836012 100644
--- a/python/servo/bootstrap.py
+++ b/python/servo/bootstrap.py
@@ -49,11 +49,16 @@ def install_linux_deps(context, pkgs_ubuntu, pkgs_fedora, force):
command.append('-y')
print("Installing missing dependencies...")
run_as_root(command + pkgs)
+ return True
+ return False
+
def install_salt_dependencies(context, force):
pkgs_apt = ['build-essential', 'libssl-dev', 'libffi-dev', 'python-dev']
pkgs_dnf = ['gcc', 'libffi-devel', 'python-devel', 'openssl-devel']
- install_linux_deps(context, pkgs_apt, pkgs_dnf, force)
+ if not install_linux_deps(context, pkgs_apt, pkgs_dnf, force):
+ print("Dependencies are already installed")
+
def gstreamer(context, force=False):
cur = os.curdir
@@ -62,6 +67,9 @@ def gstreamer(context, force=False):
os.chdir(gstdir)
subprocess.call(["bash", "gstreamer.sh"])
os.chdir(cur)
+ return True
+ return False
+
def linux(context, force=False):
# Please keep these in sync with the packages in README.md
@@ -98,11 +106,13 @@ def linux(context, force=False):
else:
pkgs_apt += ["libssl1.0-dev"]
- install_linux_deps(context, pkgs_apt, pkgs_dnf, force)
+ installed_something = install_linux_deps(context, pkgs_apt, pkgs_dnf, force)
if not check_gstreamer_lib():
- gstreamer(context, force)
+ installed_something |= gstreamer(context, force)
+ if not installed_something:
+ print("Dependencies were already installed!")
def salt(context, force=False):