saltstack/salt — pull request #14531 by garethgreenaway (2014-07-26 17:25:31+00:00)
Title: Fixes to aptpk.py for virtual packages

Switching the _get_virtual function to use pure python instead of a call to grep-available. The issue with grep-available is that it doesn't know about virtual packages until they've been installed, if you're installing a virtual package via Salt which hasn't been installed before then the process will fail because the virtual package won't be in the list of available packages. Using the apt.cache module instead ensure that _get_virtual shows *all* virtual packages. @basepi this should be cherry-picked for any new 2014.1 releases but especially for 2014.7 release. Per #14426