mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Adding support for installing patches in Zypper module
This commit is contained in:
parent
ec78ceeb58
commit
2612efc688
@ -992,7 +992,12 @@ def install(name=None,
|
||||
refresh_db()
|
||||
|
||||
try:
|
||||
pkg_params, pkg_type = __salt__['pkg_resource.parse_targets'](name, pkgs, sources, **kwargs)
|
||||
if 'advisory_ids' in kwargs:
|
||||
if pkgs:
|
||||
raise SaltInvocationError('Cannot use "advisory_ids" and "pkgs" at the same time')
|
||||
pkg_params, pkg_type = kwargs['advisory_ids'], 'advisory'
|
||||
else:
|
||||
pkg_params, pkg_type = __salt__['pkg_resource.parse_targets'](name, pkgs, sources, **kwargs)
|
||||
except MinionError as exc:
|
||||
raise CommandExecutionError(exc)
|
||||
|
||||
@ -1047,6 +1052,8 @@ def install(name=None,
|
||||
cmd_install.extend(fromrepoopt)
|
||||
|
||||
errors = []
|
||||
if pkg_type == 'advisory':
|
||||
targets = ["patch:{0}".format(t) for t in targets]
|
||||
|
||||
# Split the targets into batches of 500 packages each, so that
|
||||
# the maximal length of the command line is not broken
|
||||
|
Loading…
Reference in New Issue
Block a user