mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
commit
f5df8d7245
@ -189,7 +189,7 @@ def install(name=None, refresh=False, fromrepo=None, skip_verify=False,
|
||||
sources)
|
||||
|
||||
# Support old "repo" argument
|
||||
repo = kwargs.get('repo','')
|
||||
repo = kwargs.get('repo', '')
|
||||
if not fromrepo and repo:
|
||||
fromrepo = repo
|
||||
|
||||
@ -219,7 +219,7 @@ def install(name=None, refresh=False, fromrepo=None, skip_verify=False,
|
||||
)
|
||||
|
||||
old = list_pkgs()
|
||||
__salt__['cmd.run_all'](cmd).get('stderr', '')
|
||||
__salt__['cmd.run_all'](cmd)
|
||||
new = list_pkgs()
|
||||
return __salt__['pkg_resource.find_changes'](old, new)
|
||||
|
||||
@ -283,7 +283,7 @@ def upgrade(refresh=True, **kwargs):
|
||||
|
||||
[
|
||||
{'<package>': {'old': '<old-version>',
|
||||
'new': '<new-version>']
|
||||
'new': '<new-version>'}
|
||||
}',
|
||||
...
|
||||
]
|
||||
@ -308,10 +308,10 @@ def upgrade(refresh=True, **kwargs):
|
||||
continue
|
||||
else:
|
||||
ret_pkgs[pkg] = {'old': old_pkgs[pkg],
|
||||
'new': new_pkgs[pkg]}
|
||||
'new': new_pkgs[pkg]}
|
||||
else:
|
||||
ret_pkgs[pkg] = {'old': '',
|
||||
'new': new_pkgs[pkg]}
|
||||
'new': new_pkgs[pkg]}
|
||||
|
||||
return ret_pkgs
|
||||
|
||||
|
@ -100,7 +100,7 @@ def install(pkgs, refresh=False, skip_verify=False, **kwargs):
|
||||
__salt__['cmd.run'](cmd)
|
||||
|
||||
new = list_pkgs(*pkgs)
|
||||
return __salt__['pkg_resource.find_changes'](old,new)
|
||||
return __salt__['pkg_resource.find_changes'](old, new)
|
||||
|
||||
def list_upgrades():
|
||||
'''
|
||||
|
@ -267,10 +267,10 @@ def upgrade(refresh=False):
|
||||
continue
|
||||
else:
|
||||
ret_pkgs[pkg] = {'old': old_pkgs[pkg],
|
||||
'new': new_pkgs[pkg]}
|
||||
'new': new_pkgs[pkg]}
|
||||
else:
|
||||
ret_pkgs[pkg] = {'old': '',
|
||||
'new': new_pkgs[pkg]}
|
||||
'new': new_pkgs[pkg]}
|
||||
|
||||
return ret_pkgs
|
||||
|
||||
|
@ -164,7 +164,7 @@ def install(name=None, refresh=False, fromrepo=None,
|
||||
sources)
|
||||
|
||||
# Support old "repo" argument
|
||||
repo = kwargs.get('repo','')
|
||||
repo = kwargs.get('repo', '')
|
||||
if not fromrepo and repo:
|
||||
fromrepo = repo
|
||||
|
||||
|
@ -208,7 +208,7 @@ def install(name=None, refresh=False, pkgs=None, sources=None, **kwargs):
|
||||
if stderr:
|
||||
log.error(stderr)
|
||||
new = list_pkgs()
|
||||
return __salt__['pkg_resource.find_changes'](old,new)
|
||||
return __salt__['pkg_resource.find_changes'](old, new)
|
||||
|
||||
|
||||
def upgrade():
|
||||
|
@ -121,7 +121,7 @@ def upgrade(refresh=True, **kwargs):
|
||||
new = _get_pkgs()
|
||||
|
||||
# Return a list of the new package installed.
|
||||
return __salt__['pkg_resource.find_changes'](old,new)
|
||||
return __salt__['pkg_resource.find_changes'](old, new)
|
||||
|
||||
|
||||
def list_pkgs():
|
||||
@ -205,7 +205,7 @@ def install(name, refresh=False, version=None, **kwargs):
|
||||
new = _get_pkgs()
|
||||
|
||||
# Return a list of the new package installed.
|
||||
return __salt__['pkg_resource.find_changes'](old,new)
|
||||
return __salt__['pkg_resource.find_changes'](old, new)
|
||||
|
||||
|
||||
def remove(name, **kwargs):
|
||||
|
@ -333,9 +333,9 @@ def install(name=None, refresh=False, fromrepo=None, skip_verify=False,
|
||||
setattr(yumbase.conf, 'gpgcheck', not skip_verify)
|
||||
|
||||
# Get repo options from the kwargs
|
||||
disablerepo = kwargs.get('disablerepo','')
|
||||
enablerepo = kwargs.get('enablerepo','')
|
||||
repo = kwargs.get('repo','')
|
||||
disablerepo = kwargs.get('disablerepo', '')
|
||||
enablerepo = kwargs.get('enablerepo', '')
|
||||
repo = kwargs.get('repo', '')
|
||||
|
||||
# Support old "repo" argument
|
||||
if not fromrepo and repo:
|
||||
@ -394,7 +394,7 @@ def install(name=None, refresh=False, fromrepo=None, skip_verify=False,
|
||||
log.error('Install failed: {0}'.format(e))
|
||||
|
||||
new = list_pkgs()
|
||||
return __salt__['pkg_resource.find_changes'](old,new)
|
||||
return __salt__['pkg_resource.find_changes'](old, new)
|
||||
|
||||
|
||||
def upgrade():
|
||||
@ -432,7 +432,7 @@ def upgrade():
|
||||
log.error('Upgrade failed: {0}'.format(e))
|
||||
|
||||
new = list_pkgs()
|
||||
return __salt__['pkg_resource.find_changes'](old,new)
|
||||
return __salt__['pkg_resource.find_changes'](old, new)
|
||||
|
||||
|
||||
def remove(pkgs):
|
||||
|
@ -224,9 +224,9 @@ def install(name=None, refresh=False, fromrepo=None, skip_verify=False,
|
||||
return {}
|
||||
|
||||
# Get repo options from the kwargs
|
||||
disablerepo = kwargs.get('disablerepo','')
|
||||
enablerepo = kwargs.get('enablerepo','')
|
||||
repo = kwargs.get('repo','')
|
||||
disablerepo = kwargs.get('disablerepo', '')
|
||||
enablerepo = kwargs.get('enablerepo', '')
|
||||
repo = kwargs.get('repo', '')
|
||||
|
||||
# Support old "repo" argument
|
||||
if not fromrepo and repo:
|
||||
|
@ -188,7 +188,7 @@ def install(name=None, refresh=False, pkgs=None, sources=None, **kwargs):
|
||||
if stderr:
|
||||
log.error(stderr)
|
||||
new = list_pkgs()
|
||||
return __salt__['pkg_resource.find_changes'](old,new)
|
||||
return __salt__['pkg_resource.find_changes'](old, new)
|
||||
|
||||
|
||||
def upgrade():
|
||||
|
Loading…
Reference in New Issue
Block a user