saltstack/salt — pull request #5000 by terminalmage (2013-05-13 03:59:33+00:00)
Title: Add "pkgs" support for pkg.purged, pkg.removed states

In addition to adding support for the ``pkgs`` argument (a la ``pkg.installed``), this commit also adds use of the ``__context__`` dict to the ``list_pkgs`` function, which should noticeably improve the speed of pkg states.

This is a pretty substantial pull. I've tested the following providers:

```
apt
freebsdpkg
openbsdpkg
pacman
pkgutil
solarispkg
yumpkg
yumpkg5
zypper
```

The following remain to be tested:
```
brew
ebuild
win_pkg
```