apt: use --auto-remove with dist-upgrade (#37594)
This commit is contained in:
parent
4688a09aa8
commit
447b342662
1 changed files with 2 additions and 2 deletions
|
@ -739,7 +739,7 @@ def cleanup(m, purge=False, force=False, operation=None,
|
|||
|
||||
def upgrade(m, mode="yes", force=False, default_release=None,
|
||||
use_apt_get=False,
|
||||
dpkg_options=expand_dpkg_options(DPKG_OPTIONS), autoremove=None):
|
||||
dpkg_options=expand_dpkg_options(DPKG_OPTIONS), autoremove=False):
|
||||
|
||||
if autoremove:
|
||||
autoremove = '--auto-remove'
|
||||
|
@ -756,7 +756,7 @@ def upgrade(m, mode="yes", force=False, default_release=None,
|
|||
if mode == "dist" or (mode == "full" and use_apt_get):
|
||||
# apt-get dist-upgrade
|
||||
apt_cmd = APT_GET_CMD
|
||||
upgrade_command = "dist-upgrade"
|
||||
upgrade_command = "dist-upgrade %s" % (autoremove)
|
||||
elif mode == "full" and not use_apt_get:
|
||||
# aptitude full-upgrade
|
||||
apt_cmd = APTITUDE_CMD
|
||||
|
|
Loading…
Reference in a new issue