>>>>> "HJ" == Helmut Jarausch <jarau...@igpm.rwth-aachen.de> writes:
HJ> Hi, HJ> qfile doesn't find the corresponding packages all the time, e.g. HJ> qfile /usr/bin/pq_config showed nothing, but re-installing HJ> dev-db/postgresql-base HJ> changed that file. The package ownership of /usr/bin/pg_config isn't recorded in a way which would allow such tools to find it. That said, the file is a symlink to one which is so recorded and can be found by q, et al. A good first approximation of what you want would be a script which calls stat(1) on the target and then calls qfile on the target and, if it is a symlink, whatever the symlink points to. Eg, calling: better-qfile /usr/bin/pg_config91 on a box which has dev-db/postgresql-base:9.1 installed would determine that /usr/bin/pg_config91 links to /usr/lib64/postgresql-9.1/bin/pg_config and would therefore run: qfile /usr/bin/pg_config91 /usr/lib64/postgresql-9.1/bin/pg_config which would output the line: dev-db/postgresql-base (/usr/lib64/postgresql-9.1/bin/pg_config) There still would be files managed by eselect(1) or similar tools which wouldn't generate useful output. But for a first approximation, .... You might want to open an RFE bug report for app-portage/portage-utils suggesting that qfile gain the ability to do the (the logical equivilent of) the above itself. -JimC -- James Cloos <cl...@jhcloos.com> OpenPGP: 1024D/ED7DAEA6