Add apt.upgrade()
convenience function
this one just does the 'upgrade', but *not* the 'update'
This commit is contained in:
parent
a5b364a239
commit
96a475d0a6
|
@ -61,6 +61,16 @@ def update():
|
|||
sudo('apt-get update')
|
||||
|
||||
|
||||
def upgrade(frontend='noninteractive'):
|
||||
"""
|
||||
Perform an ``apt-get upgrade`` operation.
|
||||
"""
|
||||
options = ''
|
||||
if frontend == 'noninteractive':
|
||||
options = '--option Dpkg::Options::="--force-confdef" --option Dpkg::Options::="--force-confold"'
|
||||
sudo('DEBIAN_FRONTEND={} apt-get --assume-yes {} upgrade'.format(frontend, options))
|
||||
|
||||
|
||||
def add_repository(repo):
|
||||
"""
|
||||
Add a new APT repository
|
||||
|
|
Loading…
Reference in a new issue