I have a set of (source) URIs, distributions and sections enabled in my Debian Wheezy apt configuration. Now I want a list of all installed packages, and for each of those, the source URI, "distribution" and "section" that the currently installed version of each respective package has been installed from.
I'm basically looking for something like the output of dpkg -l but instead of the description it would show the source URI, distribution and section. Something like:
||/ Name Version Arch InstalledFrom
+++-==========-=================-=====-===================
ii package1 1:4.14-1.1+deb7u1 amd64 ftp://ftp.se.debian.org/debian wheezy main
ii package2 1.7-1 all ftp://ftp.se.debian.org/debian wheezy/updates main
ii package3 1.0.25+3~deb7u1 all ftp://ftp.se.debian.org/debian wheezy non-free
ii package4 0.9.8~3 amd64 local
ii package5 7.2.107 i386 local
How can I obtain such a list of packages?
Nicely formatted would be a bonus, but mostly anything that I can grep for interesting line substrings (or even just browse through) will likely do.