On more than one occasion I have needed to know which package installed a specific file on my system (most recently, I needed this while debugging an ebuild). Doing it with grep against the /var/db/*/*/CONTENTS files works, but is not very pretty. As a result, I wrote a Perl script to clean up the process. Perhaps this script (or a Python equivalent addition to emerge) could be added.
Created attachment 28858 [details] Perl command to query the package that installed a file on the filesystem This perl script uses Getopt::Long and Pod::Usage. It is self-documenting (run it with no arguments).
emerge gentoolkit qpkg -f <file that you want to know the origin of>
Ah, well then change that to: it would be nice if that was documented on the EBuild HOWTO page or something.
Proper command is in gentoolkit