saltstack/salt — pull request #14534 by garethgreenaway (2014-07-27 00:14:51+00:00)
Title: Switching the _get_virtual function to use pure python instead of a call to grep-available

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.