Updated patch attached. Two changes:1. Use grep-status instead of dpkg. This means needing dctrl-tools for describe. Is that a big deal? It has the desired behaviour with respect to exit codes, i.e. 0 for an installed package, 1 otherwise (dpkg --status exits with 0 for an available or installed package, 1 otherwise).
2. I removed the lines of "=====" from wajig detail's output when it uses a dpkg command, as its apt-cache-using output doesn't put these lines in.
--- commands.py.bak 2008-12-01 10:21:56.000000000 +0000 +++ commands.py 2009-04-08 22:59:18.000000000 +0100 @@ -219,8 +219,12 @@ if package_files: for f in package_files: perform.execute("dpkg-deb --info %s" % f) - print "="*72 sys.stdout.flush() + l = package_names[:] + for p in l: + if perform.execute("grep-status -PX %s" % p) == 0: + sys.stdout.flush() + package_names.remove(p) if package_names: packages = package_names else: