mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
add kwargs to available_version
This will avoid tracebacks once #3687 is implemented
This commit is contained in:
parent
8cad5ab705
commit
dd0715a83b
@ -60,7 +60,7 @@ def version(*names):
|
||||
return ret
|
||||
|
||||
|
||||
def available_version(*names):
|
||||
def available_version(*names, **kwargs):
|
||||
'''
|
||||
Return the latest version of the named package available for upgrade or
|
||||
installation
|
||||
|
@ -59,7 +59,7 @@ def _cpv_to_version(cpv):
|
||||
return str(cpv[len(_cpv_to_name(cpv) + '-'):])
|
||||
|
||||
|
||||
def available_version(*names):
|
||||
def available_version(*names, **kwargs):
|
||||
'''
|
||||
Return the latest version of the named package available for upgrade or
|
||||
installation. If more than one package name is specified, a dict of
|
||||
|
@ -48,7 +48,7 @@ def search(pkg_name):
|
||||
return {"Results": res}
|
||||
|
||||
|
||||
def available_version(*names):
|
||||
def available_version(*names, **kwargs):
|
||||
'''
|
||||
Return the latest version of the named package available for upgrade or
|
||||
installation. If more than one package name is specified, a dict of
|
||||
|
@ -75,7 +75,7 @@ def list_pkgs():
|
||||
return _format_pkgs(_get_pkgs())
|
||||
|
||||
|
||||
def available_version(name):
|
||||
def available_version(name, **kwargs):
|
||||
'''
|
||||
The available version of the package in the repository
|
||||
|
||||
@ -158,7 +158,6 @@ def install(name=None, pkgs=None, sources=None, **kwargs):
|
||||
return __salt__['pkg_resource.find_changes'](_format_pkgs(old), new)
|
||||
|
||||
|
||||
|
||||
def remove(name, **kwargs):
|
||||
'''
|
||||
Remove a single package with pkg_delete
|
||||
|
@ -28,7 +28,7 @@ def _list_removed(old, new):
|
||||
return pkgs
|
||||
|
||||
|
||||
def available_version(*names):
|
||||
def available_version(*names, **kwargs):
|
||||
'''
|
||||
Return the latest version of the named package available for upgrade or
|
||||
installation. If more than one package name is specified, a dict of
|
||||
|
@ -56,7 +56,7 @@ def version():
|
||||
return __salt__['cmd.run'](cmd)
|
||||
|
||||
|
||||
def available_version(pkg_name):
|
||||
def available_version(pkg_name, **kwargs):
|
||||
'''
|
||||
The available version of the package in the repository
|
||||
|
||||
|
@ -158,7 +158,7 @@ def version(name):
|
||||
return ''
|
||||
|
||||
|
||||
def available_version(name):
|
||||
def available_version(name, **kwargs):
|
||||
'''
|
||||
The available version of the package in the repository
|
||||
|
||||
|
@ -94,7 +94,7 @@ def list_pkgs():
|
||||
return pkg
|
||||
|
||||
|
||||
def available_version(*names):
|
||||
def available_version(*names, **kwargs):
|
||||
'''
|
||||
Return the latest version of the named package available for upgrade or
|
||||
installation. If more than one package name is specified, a dict of
|
||||
|
@ -47,7 +47,7 @@ def _list_removed(old, new):
|
||||
return pkgs
|
||||
|
||||
|
||||
def available_version(*names):
|
||||
def available_version(*names, **kwargs):
|
||||
'''
|
||||
Return the latest version of the named package available for upgrade or
|
||||
installation. If more than one package name is specified, a dict of
|
||||
@ -79,7 +79,7 @@ def available_version(*names):
|
||||
ret[name] = ''
|
||||
if name in pkgs:
|
||||
version = pkgs[name]
|
||||
if __salt__['pkg_resource.perform_cmp'](str(candidate),
|
||||
if __salt__['pkg_resource.perform_cmp'](str(candidate),
|
||||
str(version)) > 0:
|
||||
ret[name] = candidate
|
||||
continue
|
||||
@ -90,7 +90,7 @@ def available_version(*names):
|
||||
ret[name] = ''
|
||||
if name in pkgs:
|
||||
version = pkgs[name]
|
||||
if __salt__['pkg_resource.perform_cmp'](str(candidate),
|
||||
if __salt__['pkg_resource.perform_cmp'](str(candidate),
|
||||
str(version)) > 0:
|
||||
ret[name] = candidate
|
||||
return ret
|
||||
|
@ -66,7 +66,7 @@ def list_upgrades(refresh=True):
|
||||
list_updates = list_upgrades
|
||||
|
||||
|
||||
def available_version(*names):
|
||||
def available_version(*names, **kwargs):
|
||||
'''
|
||||
Return the latest version of the named package available for upgrade or
|
||||
installation. If more than one package name is specified, a dict of
|
||||
|
Loading…
Reference in New Issue
Block a user