Fix pkg.install for one-pkg install w/out version

This fixes a bug I introduced in a commit earlier today, which would
affect modules I've been working on to prepare for #3278 (yumpkg,
yumpkg5, and apt). A traditional single package install would fail
if a version was not specified.
This commit is contained in:
Erik Johnson 2013-01-26 21:08:36 -06:00
parent f5c851c0a8
commit 8230e6bd72

View File

@ -280,7 +280,7 @@ def parse_targets(name=None, pkgs=None, sources=None):
return [x[2] for x in srcinfo], 'file' return [x[2] for x in srcinfo], 'file'
elif name and __grains__['os_family'] != 'Solaris': elif name and __grains__['os_family'] != 'Solaris':
return [name], 'repository' return {name: None}, 'repository'
else: else:
log.error('No package sources passed to pkg.install.') log.error('No package sources passed to pkg.install.')