It looks as if qfile doesn't find packages containing a given file if this is a symlink, e.g. ls -l /usr/bin/pg_config gives /usr/lib64/postgresql-9.2/bin/pg_config qfile /usr/bin/pg_config doesn't show anything, but equery belongs /usr/bin/pg_config works and qfile /usr/lib64/postgresql-9.2/bin/pg_config works, as well.
the package doesn't own that symlink. it was created outside of the ebuild install (by what mechanism, i don't know exactly ... i'd have to read the code). equery dereferences the symlink first, but portage-utils does not. hence technically, the file is orphaned. you could do the same thing: $ cd ~/ $ ln -s /usr/bin/pg_config $ qfile $PWD/pg_config $ equery belongs $PWD/pg_config i'd say clearly equery is lying
(In reply to comment #2) > the package doesn't own that symlink. it was created outside of the ebuild > install (by what mechanism, i don't know exactly ... i'd have to read the > code). > > equery dereferences the symlink first, but portage-utils does not. hence > technically, the file is orphaned. > > you could do the same thing: > $ cd ~/ > $ ln -s /usr/bin/pg_config > $ qfile $PWD/pg_config > $ equery belongs $PWD/pg_config > > i'd say clearly equery is lying Sorry, but I don't understand your arguments: Here my experience: (re-)emerging dev-db/glom failed. It was clear that /usr/bin/pg_config reported an older version of dev-db/postgresql-base (there 2 different versions installed). I tried to find out what package had installed /usr/bin/pg_config and emerge did show the package which installed the file /usr/bin/pg_config is symlinked to. This was very helpful contrary to qfile. I've found out several times that qfile doesn't know the package of a file. I definitely didn't create that symlink myself. And since it points to /usr/lib64/postgresql-9.2/bin/pg_config is very likely that it is installed by dev-db/postgresql-base itself. In summary: equery depends is helpful, qfile is not (in this case) Helmut.
Technically, qfile is correct. There is not a package that owns the symlink. What equery is doing is noticing that the file is a symlink and also searching for the file that is referenced. The output from equery is reporting that the referenced file belongs to package <blah>. This was added to equery due to multiple complaints about files and libraries not being found when they were symlinks. That being said, Mike is correct in his assessment and it is up to him if he wants qfile to try to dereference a symlink to find a package.