Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

change all apt commands to use cmd.run to overcome debian apt freezes

  • Loading branch information...
commit 530fb33db58d193e05266d3f4470a5bf77807c23 1 parent 54bfb0b
@thatch45 thatch45 authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 salt/modules/apt.py
View
8 salt/modules/apt.py
@@ -96,7 +96,7 @@ def install(pkg, refresh=False):
ret_pkgs = {}
old_pkgs = list_pkgs()
cmd = 'apt-get -y install {0}'.format(pkg)
- __salt__['cmd.retcode'](cmd)
+ __salt__['cmd.run'](cmd)
new_pkgs = list_pkgs()
for pkg in new_pkgs:
@@ -127,7 +127,7 @@ def remove(pkg):
old_pkgs = list_pkgs()
cmd = 'apt-get -y remove {0}'.format(pkg)
- __salt__['cmd.retcode'](cmd)
+ __salt__['cmd.run'](cmd)
new_pkgs = list_pkgs()
for pkg in old_pkgs:
if pkg not in new_pkgs:
@@ -152,7 +152,7 @@ def purge(pkg):
# Remove inital package
purge_cmd = 'apt-get -y purge {0}'.format(pkg)
- __salt__['cmd.retcode'](purge_cmd)
+ __salt__['cmd.run'](purge_cmd)
new_pkgs = list_pkgs()
@@ -188,7 +188,7 @@ def upgrade(refresh=True):
ret_pkgs = {}
old_pkgs = list_pkgs()
cmd = 'apt-get -y dist-upgrade'
- __salt__['cmd.retcode'](cmd)
+ __salt__['cmd.run'](cmd)
new_pkgs = list_pkgs()
for pkg in new_pkgs:
Please sign in to comment.
Something went wrong with that request. Please try again.