Rerun add-apt-repository for ppa:groonga/ppa

On occasion, provisioning will fail because groonga is not added. Add a
check to see if the command fails and retry.
This commit is contained in:
umkay 2016-09-13 18:33:42 -07:00 committed by Tim Abbott
parent 9b30594bb6
commit b4108f7a5f
1 changed files with 8 additions and 2 deletions

View File

@ -125,8 +125,14 @@ def main():
os.chdir(ZULIP_PATH)
run(["sudo", "./scripts/lib/setup-apt-repo"])
# Add groonga repository to get the pgroonga packages
run(["sudo", "add-apt-repository", "-y", "ppa:groonga/ppa"])
# Add groonga repository to get the pgroonga packages; retry if it fails :/
try:
run(["sudo", "add-apt-repository", "-y", "ppa:groonga/ppa"])
except subprocess.CalledProcessError:
print(WARNING + "`Could not add groonga; retrying..." + ENDC)
run(["sudo", "add-apt-repository", "-y", "ppa:groonga/ppa"])
run(["sudo", "apt-get", "update"])
run(["sudo", "apt-get", "-y", "install", "--no-install-recommends"] + APT_DEPENDENCIES[codename])