Add apt.upgrade()
convenience function
This commit is contained in:
parent
c9aebd84e9
commit
c67cc74d3d
|
@ -67,6 +67,16 @@ def add_source(c, entry):
|
||||||
update(c)
|
update(c)
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade(c, frontend='noninteractive'):
|
||||||
|
"""
|
||||||
|
Perform an ``apt-get upgrade`` operation.
|
||||||
|
"""
|
||||||
|
options = ''
|
||||||
|
if frontend == 'noninteractive':
|
||||||
|
options = '--option Dpkg::Options::="--force-confdef" --option Dpkg::Options::="--force-confold"'
|
||||||
|
c.sudo('DEBIAN_FRONTEND={} apt-get --assume-yes {} upgrade'.format(frontend, options))
|
||||||
|
|
||||||
|
|
||||||
def dist_upgrade(c, frontend='noninteractive'):
|
def dist_upgrade(c, frontend='noninteractive'):
|
||||||
"""
|
"""
|
||||||
Perform a full ``apt-get dist-upgrade`` operation.
|
Perform a full ``apt-get dist-upgrade`` operation.
|
||||||
|
|
Loading…
Reference in a new issue