mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 19:31:58 +00:00
provision: Extract yum-specific part of install_apt_deps.
This commit is contained in:
@@ -231,10 +231,20 @@ def setup_shell_profile(shell_profile):
|
||||
write_command('cd /srv/zulip')
|
||||
|
||||
def install_apt_deps():
|
||||
# type: () -> None
|
||||
if vendor == 'CentOS':
|
||||
install_yum_deps()
|
||||
else:
|
||||
# By doing list -> set -> list conversion we remove duplicates.
|
||||
deps_to_install = list(set(SYSTEM_DEPENDENCIES[codename]))
|
||||
# setup-apt-repo does an `apt-get update`
|
||||
run(["sudo", "./scripts/lib/setup-apt-repo"])
|
||||
run(["sudo", "apt-get", "-y", "install", "--no-install-recommends"] + deps_to_install)
|
||||
|
||||
def install_yum_deps():
|
||||
# type: () -> None
|
||||
# By doing list -> set -> list conversion we remove duplicates.
|
||||
deps_to_install = list(set(SYSTEM_DEPENDENCIES[codename]))
|
||||
if vendor == 'CentOS':
|
||||
print(WARNING + "CentOS support is still experimental.")
|
||||
run(["sudo", "./scripts/lib/setup-yum-repo"])
|
||||
run(["sudo", "yum", "install", "-y"] + deps_to_install)
|
||||
@@ -251,10 +261,6 @@ def install_apt_deps():
|
||||
# Use vendored pg_hba.conf instead
|
||||
pg_hba_conf = "/var/lib/pgsql/%s/data/pg_hba.conf" % (POSTGRES_VERSION,)
|
||||
run(["sudo", "cp", "-a", "puppet/zulip/files/postgresql/centos_pg_hba.conf", pg_hba_conf])
|
||||
else:
|
||||
# setup-apt-repo does an `apt-get update`
|
||||
run(["sudo", "./scripts/lib/setup-apt-repo"])
|
||||
run(["sudo", "apt-get", "-y", "install", "--no-install-recommends"] + deps_to_install)
|
||||
|
||||
def main(options):
|
||||
# type: (Any) -> int
|
||||
|
||||
Reference in New Issue
Block a user