Fix pkg state regression

acd949c and 0b5ce09 broke the pkg state, such that for single pkg
installs (i.e. no "pkgs" or "sources"), if the version arg is not
provided, a package will always be interpreted by the pkg state as being
installed, and the package will never be installed. This commit fixes
that regression.
This commit is contained in:
Erik Johnson 2012-12-23 12:02:44 -06:00
parent 45be9c2a54
commit d1abcf7cf9

View File

@ -144,8 +144,9 @@ def installed(
'result': True,
'comment': ('Package {0} is already installed and is the '
'correct version').format(name)}
# if a version wasn't specified, we are done
elif version is None:
# if cver is not an empty string, the package is already installed
elif cver:
# The package is installed
return {'name': name,
'changes': {},