Run dist-upgrade

This commit is contained in:
James Page
2014-03-06 13:40:03 +00:00
parent 969e046b79
commit 51a7772684
2 changed files with 7 additions and 4 deletions

View File

@@ -97,14 +97,17 @@ def apt_install(packages, options=None, fatal=False):
subprocess.call(cmd, env=env) subprocess.call(cmd, env=env)
def apt_upgrade(options=None, fatal=False): def apt_upgrade(options=None, fatal=False, dist=False):
"""Install one or more packages""" """Upgrade all packages"""
if options is None: if options is None:
options = ['--option=Dpkg::Options::=--force-confold'] options = ['--option=Dpkg::Options::=--force-confold']
cmd = ['apt-get', '--assume-yes'] cmd = ['apt-get', '--assume-yes']
cmd.extend(options) cmd.extend(options)
cmd.append('upgrade') if dist:
cmd.append('dist-upgrade')
else:
cmd.append('upgrade')
log("Upgrading with options: {}".format(options)) log("Upgrading with options: {}".format(options))
env = os.environ.copy() env = os.environ.copy()

View File

@@ -352,7 +352,7 @@ def do_openstack_upgrade(configs):
'--option', 'Dpkg::Options::=--force-confdef', '--option', 'Dpkg::Options::=--force-confdef',
] ]
apt_update() apt_update()
apt_upgrade(options=dpkg_opts, fatal=True) apt_upgrade(options=dpkg_opts, fatal=True, dist=True)
# set CONFIGS to load templates from new release and regenerate config # set CONFIGS to load templates from new release and regenerate config
configs.set_release(openstack_release=new_os_rel) configs.set_release(openstack_release=new_os_rel)