From 948548b033e7425db836530273aed3d4f060b9e5 Mon Sep 17 00:00:00 2001 From: yuvipanda Date: Sun, 19 May 2019 20:36:10 -0700 Subject: [PATCH] bootstrap: Install software-properties-common Gets us add-apt-repository, which helps ensure the universe repository is enabled. --- bootstrap/bootstrap.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bootstrap/bootstrap.py b/bootstrap/bootstrap.py index bf65a27..03336e0 100644 --- a/bootstrap/bootstrap.py +++ b/bootstrap/bootstrap.py @@ -66,6 +66,13 @@ def main(): else: logger.info('Setting up hub environment') initial_setup = True + # Install software-properties-common, so we can get add-apt-repository + # That helps us make sure the universe repository is enabled, since + # that's where the python3-pip package lives. In some very minimal base + # VM images, it looks like the universe repository is disabled by default, + # causing bootstrapping to fail. + subprocess.check_output(['apt-get', 'update', '--yes'], stderr=subprocess.STDOUT) + subprocess.check_output(['apt-get', 'install', '--yes', 'software-properties-common'], stderr=subprocess.STDOUT) subprocess.check_output(['add-apt-repository', 'universe'], stderr=subprocess.STDOUT) subprocess.check_output(['apt-get', 'update', '--yes'], stderr=subprocess.STDOUT) subprocess.check_output(['apt-get', 'install', '--yes', 'python3', 'python3-venv', 'git'], stderr=subprocess.STDOUT)