saltstack/salt — pull request #9469 by terminalmage (2013-12-27 23:13:58+00:00)
Title: Don't run pkg.refresh_db before checking targets

In 5a95286, a call to pkg.refresh_db was placed before the function that
checks to see which targeted packages need to be installed. This was
done specifically to make newly-added repos available to pkg states in
the same highstate run. This commit moves the refresh_db to the pkgrepo
state instead.