Fix condition for Gentoo USE flag update

In this scenario, ``avail[pkg]`` contains an empty string, we want to
reinstall the current version with new USE flags so the
currently-installed version is what we need to add to the targets.
This commit is contained in:
Erik Johnson 2016-08-29 19:18:32 -05:00
parent 1542fd4716
commit b0b419d1d8

View file

@ -1637,7 +1637,7 @@ def latest(
and __salt__['portage_config.is_changed_uses'](pkg):
# Package is up-to-date, but Gentoo USE flags are changing so
# we need to add it to the targets
targets[pkg] = avail[pkg]
targets[pkg] = cur[pkg]
else:
# Package either a) is not installed, or b) is installed and has an
# upgrade available