bootstrap: Install software-properties-common

Gets us add-apt-repository, which helps ensure the
universe repository is enabled.
This commit is contained in:
yuvipanda
2019-05-19 20:36:10 -07:00
parent 395cb93290
commit 948548b033

View File

@@ -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)