mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Make other pkg providers properly handle purge_desired
This commit is contained in:
parent
3e73255c6c
commit
84ed6ee36c
@ -73,8 +73,9 @@ def list_pkgs(versions_as_list=False, **kwargs):
|
||||
salt '*' pkg.list_pkgs
|
||||
'''
|
||||
versions_as_list = salt.utils.is_true(versions_as_list)
|
||||
# 'removed' not yet implemented or not applicable
|
||||
if salt.utils.is_true(kwargs.get('removed')):
|
||||
# not yet implemented or not applicable
|
||||
if any([salt.utils.is_true(kwargs.get(x))
|
||||
for x in ('removed', 'purge_desired')]):
|
||||
return {}
|
||||
|
||||
if 'pkg.list_pkgs' in __context__:
|
||||
|
@ -343,8 +343,9 @@ def list_pkgs(versions_as_list=False, **kwargs):
|
||||
salt '*' pkg.list_pkgs
|
||||
'''
|
||||
versions_as_list = salt.utils.is_true(versions_as_list)
|
||||
# 'removed' not yet implemented or not applicable
|
||||
if salt.utils.is_true(kwargs.get('removed')):
|
||||
# not yet implemented or not applicable
|
||||
if any([salt.utils.is_true(kwargs.get(x))
|
||||
for x in ('removed', 'purge_desired')]):
|
||||
return {}
|
||||
|
||||
if 'pkg.list_pkgs' in __context__:
|
||||
|
@ -249,8 +249,9 @@ def list_pkgs(versions_as_list=False, with_origin=False, **kwargs):
|
||||
salt '*' pkg.list_pkgs
|
||||
'''
|
||||
versions_as_list = salt.utils.is_true(versions_as_list)
|
||||
# 'removed' not applicable
|
||||
if salt.utils.is_true(kwargs.get('removed')):
|
||||
# not yet implemented or not applicable
|
||||
if any([salt.utils.is_true(kwargs.get(x))
|
||||
for x in ('removed', 'purge_desired')]):
|
||||
return {}
|
||||
|
||||
if 'pkg.list_pkgs' in __context__:
|
||||
|
@ -45,8 +45,9 @@ def list_pkgs(versions_as_list=False, **kwargs):
|
||||
salt '*' pkg.list_pkgs
|
||||
'''
|
||||
versions_as_list = salt.utils.is_true(versions_as_list)
|
||||
# 'removed' not yet implemented or not applicable
|
||||
if salt.utils.is_true(kwargs.get('removed')):
|
||||
# not yet implemented or not applicable
|
||||
if any([salt.utils.is_true(kwargs.get(x))
|
||||
for x in ('removed', 'purge_desired')]):
|
||||
return {}
|
||||
|
||||
if 'pkg.list_pkgs' in __context__:
|
||||
|
@ -170,8 +170,9 @@ def list_pkgs(versions_as_list=False, **kwargs):
|
||||
salt '*' pkg.list_pkgs
|
||||
'''
|
||||
versions_as_list = salt.utils.is_true(versions_as_list)
|
||||
# 'removed' not yet implemented or not applicable
|
||||
if salt.utils.is_true(kwargs.get('removed')):
|
||||
# not yet implemented or not applicable
|
||||
if any([salt.utils.is_true(kwargs.get(x))
|
||||
for x in ('removed', 'purge_desired')]):
|
||||
return {}
|
||||
|
||||
if 'pkg.list_pkgs' in __context__:
|
||||
|
@ -214,8 +214,9 @@ def list_pkgs(versions_as_list=False, **kwargs):
|
||||
salt '*' pkg.list_pkgs
|
||||
'''
|
||||
versions_as_list = salt.utils.is_true(versions_as_list)
|
||||
# 'removed' not yet implemented or not applicable
|
||||
if salt.utils.is_true(kwargs.get('removed')):
|
||||
# not yet implemented or not applicable
|
||||
if any([salt.utils.is_true(kwargs.get(x))
|
||||
for x in ('removed', 'purge_desired')]):
|
||||
return {}
|
||||
|
||||
pkgin = _check_pkgin()
|
||||
|
@ -305,8 +305,9 @@ def list_pkgs(versions_as_list=False,
|
||||
salt '*' pkg.list_pkgs jail=<jail name or id>
|
||||
salt '*' pkg.list_pkgs chroot=/path/to/chroot
|
||||
'''
|
||||
# 'removed' not applicable
|
||||
if salt.utils.is_true(kwargs.get('removed')):
|
||||
# not yet implemented or not applicable
|
||||
if any([salt.utils.is_true(kwargs.get(x))
|
||||
for x in ('removed', 'purge_desired')]):
|
||||
return {}
|
||||
|
||||
versions_as_list = salt.utils.is_true(versions_as_list)
|
||||
|
@ -78,8 +78,9 @@ def list_pkgs(versions_as_list=False, **kwargs):
|
||||
salt '*' pkg.list_pkgs
|
||||
'''
|
||||
versions_as_list = salt.utils.is_true(versions_as_list)
|
||||
# 'removed' not yet implemented or not applicable
|
||||
if salt.utils.is_true(kwargs.get('removed')):
|
||||
# not yet implemented or not applicable
|
||||
if any([salt.utils.is_true(kwargs.get(x))
|
||||
for x in ('removed', 'purge_desired')]):
|
||||
return {}
|
||||
|
||||
if 'pkg.list_pkgs' in __context__:
|
||||
|
@ -235,8 +235,9 @@ def list_pkgs(versions_as_list=False, **kwargs):
|
||||
salt '*' pkg.list_pkgs versions_as_list=True
|
||||
'''
|
||||
versions_as_list = salt.utils.is_true(versions_as_list)
|
||||
# 'removed' not yet implemented or not applicable
|
||||
if salt.utils.is_true(kwargs.get('removed')):
|
||||
# not yet implemented or not applicable
|
||||
if any([salt.utils.is_true(kwargs.get(x))
|
||||
for x in ('removed', 'purge_desired')]):
|
||||
return {}
|
||||
|
||||
if 'pkg.list_pkgs' in __context__:
|
||||
|
@ -264,8 +264,9 @@ def list_pkgs(versions_as_list=False, **kwargs):
|
||||
salt '*' pkg.list_pkgs
|
||||
'''
|
||||
versions_as_list = salt.utils.is_true(versions_as_list)
|
||||
# 'removed' not yet implemented or not applicable
|
||||
if salt.utils.is_true(kwargs.get('removed')):
|
||||
# not yet implemented or not applicable
|
||||
if any([salt.utils.is_true(kwargs.get(x))
|
||||
for x in ('removed', 'purge_desired')]):
|
||||
return {}
|
||||
|
||||
if 'pkg.list_pkgs' in __context__:
|
||||
|
@ -172,8 +172,9 @@ def list_pkgs(versions_as_list=False, **kwargs):
|
||||
salt '*' pkg.list_pkgs
|
||||
'''
|
||||
versions_as_list = salt.utils.is_true(versions_as_list)
|
||||
# 'removed' not yet implemented or not applicable
|
||||
if salt.utils.is_true(kwargs.get('removed')):
|
||||
# not yet implemented or not applicable
|
||||
if any([salt.utils.is_true(kwargs.get(x))
|
||||
for x in ('removed', 'purge_desired')]):
|
||||
return {}
|
||||
|
||||
if 'pkg.list_pkgs' in __context__:
|
||||
|
Loading…
Reference in New Issue
Block a user