zypper.py: fix version argument being ignored

This commit is contained in:
Erik Johnson 2018-03-14 23:34:36 -05:00
parent 214f2d6ad3
commit f3f5dec239
No known key found for this signature in database
GPG key ID: 5E5583C437808F3F

View file

@ -1205,6 +1205,15 @@ def install(name=None,
return {}
version_num = Wildcard(__zypper__)(name, version)
if version_num:
if pkgs is None and sources is None:
# Allow "version" to work for single package target
pkg_params = {name: version_num}
else:
log.warning('"version" parameter will be ignored for multiple '
'package targets')
if pkg_type == 'repository':
targets = []
problems = []