diff --git a/tools/provision.py b/tools/provision.py index 86ffc42b7a..e05a403859 100755 --- a/tools/provision.py +++ b/tools/provision.py @@ -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])