mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 18:06:44 +00:00
provision: Don't install lsb-release if already installed.
This early bootstrapping step should be rearely required, and it saves about 0.5s in our no-op provision time.
This commit is contained in:
@@ -99,7 +99,9 @@ else:
|
|||||||
|
|
||||||
# Ideally we wouldn't need to install a dependency here, before we
|
# Ideally we wouldn't need to install a dependency here, before we
|
||||||
# know the codename.
|
# know the codename.
|
||||||
subprocess.check_call(["sudo", "apt-get", "install", "-y", "lsb-release"])
|
if not os.path.exists("/usr/bin/lsb_release"):
|
||||||
|
subprocess.check_call(["sudo", "apt-get", "install", "-y", "lsb-release"])
|
||||||
|
|
||||||
vendor = subprocess_text_output(["lsb_release", "-is"])
|
vendor = subprocess_text_output(["lsb_release", "-is"])
|
||||||
codename = subprocess_text_output(["lsb_release", "-cs"])
|
codename = subprocess_text_output(["lsb_release", "-cs"])
|
||||||
if not (vendor in SUPPORTED_PLATFORMS and codename in SUPPORTED_PLATFORMS[vendor]):
|
if not (vendor in SUPPORTED_PLATFORMS and codename in SUPPORTED_PLATFORMS[vendor]):
|
||||||
|
|||||||
Reference in New Issue
Block a user